phalcon/cphalcon · error · Phalcon\Mvc\Model\Query\Exceptions\InvalidCachingOptions
Invalid caching options
Error message
Invalid caching options
What it means
Error "Invalid caching options" thrown in phalcon/cphalcon.
Source
Thrown at phalcon/Mvc/Model/Query.zep:343
}
/**
* Executes a parsed PHQL statement
*
* @return mixed
*/
public function execute(array bindParams = [], array bindTypes = [])
{
var adapter, cache, cacheLifetime, cacheOptions, cacheService,
defaultBindParams, defaultBindTypes, intermediate, key, lifetime,
mergedParams, mergedTypes, preparedResult, result, type, uniqueRow;
let uniqueRow = this->uniqueRow,
cacheOptions = this->cacheOptions;
if cacheOptions !== null {
if unlikely typeof cacheOptions != "array" {
throw new InvalidCachingOptions();
}
/**
* The user must set a cache key
*/
if unlikely !fetch key, cacheOptions["key"] {
throw new MissingCacheKey();
}
if !fetch cacheService, cacheOptions["service"] {
let cacheService = "modelsCache";
}
let cache = this->container->getShared(cacheService);
if unlikely (true !== is_a(cache, CacheInterface::class)) {
throw new InvalidQueryCacheService();
}View on GitHub (pinned to b7419de9cd)
When it happens
Trigger: Thrown at phalcon/Mvc/Model/Query.zep:343 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21).
Data as JSON: /api/errors/36769f8448b8ce29.
Report an issue: GitHub.