NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP caching (not opcode)

Patrick May patrick at hexane.org
Mon Jul 21 17:50:32 EDT 2008


Having a configurable cache backend is definitely one of the reasons I want
to put this stuff in a library.  Ideally the backend would use a URL-like
configuration line, so it becomes like a JDBC url that is set in a config
file.

Thanks again,

Patrick



On Mon, Jul 21, 2008 at 5:41 PM, bzcoder <bzcoder at bzcode.com> wrote:

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



-- 
Patrick May
135 Oak Street
Brooklyn, NY 11222
+1 (347) 232-5208
patrick at hexane.org
http://www.hexane.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20080721/481b67ac/attachment.html>


More information about the talk mailing list