On Nov 18, 2007, at 7:23 PM, codesite...@google.com wrote:Author: epithetDate: Sun Nov 18 16:22:00 2007New Revision: 1099Added:trunk/htdocs/system/classes/filecache.phpModified:trunk/htdocs/index.phptrunk/htdocs/system/admin/dashboard.phptrunk/htdocs/system/classes/cache.phpLog:Pass 1 at cache implementation.Included FileCache implements file-based caching at system/cache. Itneeds to be created an writable, or nothing gets cached.Dashboard gets a cache applied to the incoming links section. Seethatsection of code to see the cache implemented.
FileCache does not yet implement _expire() or _extend().
I was wondering why we are saving cached items in /system/. Other
than the slightly uneasy feeling having a writeable dir in /system/
gives me I don't really have any objections, just wondering why we
were using /user/.
I don't particularly like it being in /system either — where are user plugins meant to cache, for example? Making them cache in /system seems illogical. I personally would prefer creating a /cache folder, or, alternatively, creating a /files folder under which every web-server writeable file/folder exists.
Why do plugins need their own cache?
Owen
Why would there be conflicts? Why would there be a need to separate system and plugin caches? A cache is expendable, it’s doomed from the time it’s created and serves a temporary purpose by nature.
Also, the cache location is set via a static that could potentially be changed to use whatever path you want, or I guess a plugin could. Which makes sense as a plugin could potentially add other caching mechanisms beside filesystem.
As it is now, it’s dead simple to use, and requires next to nothing from plugin developers. It just works, that is after you create the directory and change permissions on it so that Apache can write to it.
While I might agree that system/cache might not be the best location from a user perspective, since the user would have to create and chmod the directory, I really do not see why we should make it more complex my creating plugin subdirs etc. There is no need for that.
Christian
I’ve added a very small patch to issue 487 (http://code.google.com/p/habari/issues/detail?id=487 ) that enables logging if the cache directory is inaccessible. At least that provides a indication to the user that caching is not working and that the cache dir isn’t working.
Christian
From: habar...@googlegroups.com
[mailto:habar...@googlegroups.com] On Behalf Of Robin Adrianse
Sent: 21. november 2007 08:42
To: habar...@googlegroups.com
Subject: [habari-dev] Re: Location of cache folder
I suppose it could be to avoid conflicts, but I think that it isn't necessarily necessary.
> I’ve added a very small patch to issue 487
> (http://code.google.com/p/habari/issues/detail?id=487 ) that enables
> logging if the cache directory is inaccessible. At least that provides a
> indication to the user that caching is not working and that the cache
> dir isn’t working.
Committed, thanks.
-Matt