zend-cache

Zend Cache doesn't kick in

Ok, here's the problem: $frontendOptions = array( 'lifetime' => 7200, 'debug_header' => true, // for debugging, but it doesn't work.. regexps' => array( // Cache the static pages '^/pages/' => array('cache' => true), ) ); $backendOptions = $config->cache->backOptions->toArray(); // getting a Zend_Cache_...

Zend Cache Core and APC - I don't understand how old cache entries get invalidated

For Zend_Cache_Frontend_Core you can define a lifetime and, according to the documentation, a "automatic_cleaning_factor". According to the manual, this property specifies on how many writes to the cache old cache entries get invalid. When I use APC as backend shouldn't the cache invalidate itself automatically without having to write ...

How to use Zend_Cache Identifier ?

Hi Folks, i think iam getting crazy, iam trying to implement Zend_Cache to cache my database query. I know how it works and how to configure. But i cant find a good way to set the Identifier for the cache entrys. I have an method wich search for records in my database (based on an array with search values). /** * Find Record(s) * Re...

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

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...

Zend_Cache And UTF-8 Problem

I'm trying to save UTF-8 characters with Zend_Cache (like Ť, š etc) but Zend_Cache is messing them up and saves them as Å, ¾ and other weird characters. Here is a snippet of my code that saves the data to the cache (the UTF-8 characters are messed up only online, when I try it on my PC on localhost it works ok): // cache the external d...

How to use Zend Cache with SimpleXML objects?

I'm trying to cache the user timeline of a Twitter feed using Zend_Service_Twitter which returns its results as a SimpleXML object. Unfortunately the regular serialize functions (which Zend Cache uses) don't play nice with SimpleXMl objects. I found this http://www.mail-archive.com/[email protected]/msg18133.html. So it looks l...

Zend page caching similar to smarty?

Hello, I there a way to make zend_cache treat front end view similar to smarty? I would like to reduce load times and page caching seems the best way todo this. Also it would need something similar to {nocache}. Okay so I now have: Bootstrap.php protected function _initCache() { $this->bootstrap('locale'); $locale = $thi...

How do you set cache time lenght of memcache with Zend_cache?

I know that you can specify how long you want an object cached in memcache, however I setup memcache with Zend's Zend_Cache and there does not appear to be documentation related to how long the item stays in cache. Anyone know how to do this? ...

How do I use Zend Cache on this particular problem

I have an action that renders two different view scripts based on whether the user is logged in or not. class IndexController extends Zend_Controller_Action { .... public function indexAction() { $auth = Zend_Auth::getInstance(); if($auth->hasIdentity()) { ...

Catching Zend mvc Action o/p

I need to catch the o/p generated by actions based on request params, which needs to be injected in template. Can anybody tell me how it is possible. ...

Generating a unique id for a given string using php

I'm using Zend_Cache_Core with Zend_Cache_Backend_File to cache results of queries executed for a model class that accesses the database. Basically the queries themselves should form the id by which to cache the obtained results, only problem is, they are too long. Zend_Cache_Backend_File doesn't throw an exception, PHP doesn't complai...

Why is my PHP error log lagging behind by 2 hours?

When checking php.ini, from both phpinfo and php -i on the command line, my timezone is set to Africa/Johannesburg. So my timezone is GMT +2. I wrote a tiny snippet to check the time is right as follows: echo date('h:i A', time()); echo '<br />' . ini_get('date.timezone'); and this outputs the correct time, matching with my localmach...

Zend_Cache unserialize - memory hog?

I've setup Zend_Db_Table_Abstract so it uses metadata cache and then profiled with xhprof to see how much memory it uses. Turns out 34 calls from _setupMetadata to Zend_Cache_Core::load use up 7mb memory, most of it being used by calling unserialize. The configuration for the metadata cache is: resources.cachemanager.db_metadata.front...

Zend Cache - problem with deleting cache files

I have an strange problem with Zend Cacke (File Backend) running on linux with apache and php 5.2 The files are stored in /myspace/tmp1 Directory has the persmission: drwxrwxrwx 2 nobody nogroup 8192 2010-09-20 13:35 tmp1 The created temp file has the following permissions: -rw------- 1 nobody nogroup 317 2010-09-20 13:40 conten...

Where should I implement cache within Zend_Db ?

Hi, I'm looking to implement a cache within Zend_Db, there isn't any native method to provide a cache to Zend_Db, so I'm wondering where should I do it. I took a look to the Zend_Db_Table_Abstract (I'm extending it in a custom App_Model_DbTable_Abstract) and I found a protected method _fetch() which directly take a Zend_Db_Table_Select...

What's the current state of accelerators in Zend?

I hear about accelerators such as these in PHP. I believe APC is making it to PHP 6 also. Eaccelerator APC Xcache What's the state of accelerators in Zend? I see a Zend_Cache. Is it the standard and is there more? ...

Zend_Cache: After loading cached data, character encoding seems messed up

Hi all, First; On my development server (localhost; default XAMPP on OSX) everything works fine, though when I deploy the exact same code (and data) to the staging server (managed Apache2 on Redhat) it breaks. I'm caching some data using Zend_Cache using the File backend and auto-serialization. Special characters used in the original d...