zend-cache

ZF: Disable Resource Plugin in application.ini

徘徊边缘 提交于 2020-01-02 16:18:49
问题 How can I disable cache in the cli enviroment? Reason being, the system user that executes the script is not allowed to write to the cache directory, thus the script is unable to execute. In my application.ini I have [production] resources.cachemanager.database.frontend.name = Core resources.cachemanager.database.frontend.customFrontendNaming = false resources.cachemanager.database.frontend.options.lifetime = 7200 resources.cachemanager.database.frontend.options.automatic_serialization = true

Zend OPCache - opcache.enable_cli 1 or 0? What does it do?

▼魔方 西西 提交于 2019-12-30 01:37:48
问题 In the documentation it says "mostly used for debugging" which would lead me think "never enable it unless you've a problem and need to do some debugging," however reading mostly everything that I could find about it says to enable it "opcache.enable_cli 1" but why? I could not find any information concerning this matter, so if anybody knows, why should I enable it if the documentation basically says to keep it on 0? 回答1: Leave it off. It's primarily there for use while debugging issues with

How to selectively clear cache (using tags or other option) with Memchached backend and Zend Framework

旧城冷巷雨未停 提交于 2019-12-12 14:51:58
问题 We use Memcached and Zend Framework in our web project. Now, we need to clean cache selectively using tags as specified in Zend_Cache API. Unfortunately, memcached doesn't support tags. I have found these workarounds: Memcached-tag project. Has anybody tested it? How to implement it with Zend? Use wildchards like in this question, but it seems a bit confusing, less transparent and harder to implement with Zend. Use this implementation or this one, for supporting tags in Memcached, beeing

Caching whole html output with zend

人盡茶涼 提交于 2019-12-12 02:48:48
问题 I am trying to cache everything that is output by layout script and controller's action script using Zend_Cache but it is not working correctly. All I get is DEBUG HEADER : This is a cached page ! I got layout.phtml script and index.phtml script. Both produce html code. In my IndexController i put $frontendOptions = array( 'lifetime' => 7, 'debug_header' => true, 'regexps' => array( '^/$' => array('cache' => true), '^/index/' => array('cache' => true) ) ); $backendOptions = array('cache_dir'

In-Memory script cache backend in zend framework

江枫思渺然 提交于 2019-12-11 11:32:11
问题 I'm looking for solution for a in memory script cache, using Zend_Cache and zend framework. We have a few cases in our application, that in order to display a table with, let's say, 100 elements, the logic is as the following: fetch 100 items from the content table (a single query) for every item, get the creator user and user who approved the content from the db / memcache backend (this is usually done from a for loop) In most cases, the user who approved the content is a 2 or 3 admin users,

SilverStripe behind load balancer

可紊 提交于 2019-12-10 10:54:54
问题 I've got an instance of SilverStripe running on two servers behind an AWS load balancer. To share the session information I'm running Elasticache Redis server. I'm setting my php session store info as such: ini_set('session.save_handler', 'redis'); ini_set('session.save_path', 'tcp://127.0.0.1:6379'); After I've signed into the admin section of the CMS I can jump between servers and it remembers me, however when switching between sections in the CMS the main section doesn't render (an AJAX

Zend_Paginator and cache. How can I read the datas that I have sent to cache

别等时光非礼了梦想. 提交于 2019-12-07 15:17:18
问题 I register the data to cache and I see the foliowing : zend_cache---Zend_Paginator_1_42242d5fa3c4e4b7758810c276163e8a but I can't read. $request = $this->getRequest(); $q = new Model(); $paginator = Zend_Paginator::factory($q->fetchAll()); $paginator->setCurrentPageNumber($request->getParam('p')); $paginator->setItemCountPerPage(40); $this->view->q = $paginator; $fO = array('lifetime' => 3600, 'automatic_serialization' => true); $bO = array('cache_dir'=> APPLICATION_PATH . '/cache/'); $cache

ZF: Disable Resource Plugin in application.ini

折月煮酒 提交于 2019-12-06 10:39:51
How can I disable cache in the cli enviroment? Reason being, the system user that executes the script is not allowed to write to the cache directory, thus the script is unable to execute. In my application.ini I have [production] resources.cachemanager.database.frontend.name = Core resources.cachemanager.database.frontend.customFrontendNaming = false resources.cachemanager.database.frontend.options.lifetime = 7200 resources.cachemanager.database.frontend.options.automatic_serialization = true resources.cachemanager.database.backend.name = File resources.cachemanager.database.backend

SilverStripe behind load balancer

谁说我不能喝 提交于 2019-12-06 05:55:08
I've got an instance of SilverStripe running on two servers behind an AWS load balancer. To share the session information I'm running Elasticache Redis server. I'm setting my php session store info as such: ini_set('session.save_handler', 'redis'); ini_set('session.save_path', 'tcp://127.0.0.1:6379'); After I've signed into the admin section of the CMS I can jump between servers and it remembers me, however when switching between sections in the CMS the main section doesn't render (an AJAX call). From what I can tell the other server doesn't realise (which ever one you request from second) you

How do I set expire time for Zend Cache Storage?

丶灬走出姿态 提交于 2019-12-06 04:26:01
问题 I would like to store some XML in a Zend filesystem cache and have it expire after 30 minutes. How does one set the cache duration / expiry? I am using Zend cache as a component and not in the context of a full ZF2 application. $cache = \Zend\Cache\StorageFactory::factory(array( 'adapter' => array( 'name' => 'filesystem', 'ttl' => 60, // kept short during testing 'options' => array('cache_dir' => __DIR__.'/cache'), ), 'plugins' => array( // Don't throw exceptions on cache errors 'exception