2008年12月23日星期二

[fw-core] Zend_cache_Backend_File too slow

Hi,
I am using the Zend_Cache

$cache = Zend_Cache::factory('Core', 'File', $frontendOptions,
$backendOptions);

to cache a sql queries (lists). When you insert or update some item related
to a query its cache must be removed.
I am using the tags. When I create a new cache I tag it with the names of
all tables involved in that query.
While this tables do not change the cache is available.
But when a change happens:
In My_Model_Db_Table class i put this:

$cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array($this->_name));

and works perfectly (it deletes the correct cache) but it is too slow.
I do not know why but it takes more than 20 seg .
The inserts and updates are common and it takes a long time.

I was reading a thread related to this problem

http://www.nabble.com/Optimize-Zend_Cache-clearing-tt16809942.html

but i could not find a valid solution to use the Zend_cache_Backend_File

Greeting.
Thanks.
Cristina.

--
View this message in context: http://www.nabble.com/Zend_cache_Backend_File-too-slow-tp21142260p21142260.html
Sent from the Zend Core mailing list archive at Nabble.com.

没有评论: