Patrick May wrote:
I know this could be done with:
system('find /cache | grep article | xargs rm -f');
and I do question what's wrong with such a simple line of code :D
I want a simple abstract "clear cache" line of code to embed in
various CMS locations, while the actual mechanics of clearing cache
are managed by the library. By simplifing the process of describing
something that is cached, I hope to have widespread 'perfect' caching.
Perhaps this goes without saying, but I was assuming you were thinking
of file system caching only as the basic underlying method, and not the
only method.
IE you have a system cache setup as:
$cache->check("somecode1");
$cache->get("somecode1");
$cache->save("somecode1");
$cache->clear("code1");
But your actual cache function should be extendable, so it can cache to
the file system, it can cache to a database, and it can cache to
memcached(http://www.danga.com/memcached/).
That way your scalable from people who need file system caching, to
people who want a central repository and can't do shared files, and
then people who want to maximize performance and can throw memory at the
problem.
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php