Class Phalcon\Cache\Multiple

<?phpusePhalcon\Cache\Frontend\DataasDataFrontend;usePhalcon\Cache\Multiple;usePhalcon\Cache\Backend\ApcasApcCache;usePhalcon\Cache\Backend\MemcacheasMemcacheCache;usePhalcon\Cache\Backend\FileasFileCache;$ultraFastFrontend=newDataFrontend(["lifetime"=>3600,]);$fastFrontend=newDataFrontend(["lifetime"=>86400,]);$slowFrontend=newDataFrontend(["lifetime"=>604800,]);//Backends are registered from the fastest to the slower$cache=newMultiple([newApcCache($ultraFastFrontend,["prefix"=>"cache",]),newMemcacheCache($fastFrontend,["prefix"=>"cache","host"=>"localhost","port"=>"11211",]),newFileCache($slowFrontend,["prefix"=>"cache","cacheDir"=>"../app/cache/",]),]);//Save, saves in every backend$cache->save("my-key",$data);