2011年3月7日星期一

[fw-db] Programmatically Clear Metadata Cache?

I've just up automatic (mem)caching of all Zend_DB_Table's. From time to
time, of course, the metadata changes. We do this in our production
environment by running sql scripts that add / drop / change columns as
necessary. I need some programmatic way to expire the metadata cache after
the sql runs, and no later than when updated code goes live, which is a
matter of minutes. I can't just wait til it times out.

I've dug into Zend 1.11 Zend_Db_Table_Abstract, and the memcache key is an
md5 encoding of an optional port, optional host, dbname, schema name and
table name. There does not appear to be member function to expire the cache,
nor even a function to return the md5 encoded key so I can delete it
manually.

How are we supposed to clear the metadata cache when the metadata changes?

Thanks in advance for your help!

--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/Programmatically-Clear-Metadata-Cache-tp3340068p3340068.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: