Caching database statements.