Re: [fw-general] About a way of refreshing MetaDataCache of Zend_Db_Table.

2011-03-02 Thread koji ueda
Thank you everyone.

Although I am using cache id prefix, I overlooked it.

As long as I create Zend_Cache instance with prefix option, I can
clean cache data in one project.

I know now.
Thank you so match.


Re: [fw-general] About a way of refreshing MetaDataCache of Zend_Db_Table.

2011-03-01 Thread Jurian Sluiman
On Tuesday 01 Mar 2011 17:35:03 Hector Virgen wrote:
> On Tue, Mar 1, 2011 at 12:00 AM, koji ueda  wrote:
> > Is there a way of refresh or clear cache?
> 
> If your cache only contains db meta data you can call
> $cache->clean(Zend_Cache::CLEANING_MODE_ALL);
> 
> If it has other cache data then I suggest using a cache id prefix. Check
> out the docs for how to set up the cache id prefix:
> 
> http://framework.zend.com/manual/en/zend.cache.frontends.html

When Zend_Cache is used, the cache id is created as 
"port:host/dbname:schema.table". From the code:

$cacheId = md5($port . $host . '/'. $dbConfig['dbname'] . ':'
 . $this->_schema. '.' . $this->_name);

So if you know these values you can also create the cache id again and only 
remove that entry.

Regards, Jurian
-- 
Jurian Sluiman
Soflomo - http://soflomo.com


Re: [fw-general] About a way of refreshing MetaDataCache of Zend_Db_Table.

2011-03-01 Thread Hector Virgen
On Tue, Mar 1, 2011 at 12:00 AM, koji ueda  wrote:

> Is there a way of refresh or clear cache?
>

If your cache only contains db meta data you can call
$cache->clean(Zend_Cache::CLEANING_MODE_ALL);

If it has other cache data then I suggest using a cache id prefix. Check out
the docs for how to set up the cache id prefix:

http://framework.zend.com/manual/en/zend.cache.frontends.html

--
*Hector Virgen*
Sr. Web Developer
http://www.virgentech.com