{"record":{"id":"36769f8448b8ce29","repo":"phalcon/cphalcon","slug":"invalid-caching-options","errorCode":null,"errorMessage":"Invalid caching options","messagePattern":"Invalid caching options","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\Query\\Exceptions\\InvalidCachingOptions","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model/Query.zep","lineNumber":343,"sourceCode":"    }\n\n    /**\n     * Executes a parsed PHQL statement\n     *\n     * @return mixed\n     */\n    public function execute(array bindParams = [], array bindTypes = [])\n    {\n        var adapter, cache, cacheLifetime, cacheOptions, cacheService,\n            defaultBindParams, defaultBindTypes, intermediate, key, lifetime,\n            mergedParams, mergedTypes, preparedResult, result, type, uniqueRow;\n\n        let uniqueRow    = this->uniqueRow,\n            cacheOptions = this->cacheOptions;\n\n        if cacheOptions !== null {\n            if unlikely typeof cacheOptions != \"array\" {\n                throw new InvalidCachingOptions();\n            }\n\n            /**\n             * The user must set a cache key\n             */\n            if unlikely !fetch key, cacheOptions[\"key\"] {\n                throw new MissingCacheKey();\n            }\n\n            if !fetch cacheService, cacheOptions[\"service\"] {\n                let cacheService = \"modelsCache\";\n            }\n\n            let cache = this->container->getShared(cacheService);\n\n            if unlikely (true !== is_a(cache,  CacheInterface::class)) {\n                throw new InvalidQueryCacheService();\n            }","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model/Query.zep#L325-L361","documentation":"Error \"Invalid caching options\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model/Query.zep:343 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}