hello, i used modelsMetadata, modelsCache and simple cahce ad servises. ex: $di->set("modelsCache", function() use ($config) { $frontCache = new \Phalcon\Cache\Frontend\Data(array("lifetime" => 180)); return new \Phalcon\Cache\Backend\Libmemcached($frontCache, $config->memcached); });
In all models used cached keys
ex: public static function findFirstByKey( string $key) { return self::findFirst([ "key = ?0", "bind" => [$key], "cache" => ["key" => "findFirstByResourceKey".$key, "lifetime" => 3600], ]); }
a cache can be turned off in one place? ex: $di->set("modelsCache", false) or $di->set("modelsCache" function() { return false; })
$di->set("modelsCache" function() use $config {
if($config->env == "dev") return false;
or load memcache ...
})
at each location change keys is wrong! any ideas ? I want to check the load without cache