Page 1 of 1

Where to put cache-files?

Posted: Fri Feb 08, 2008 9:39 am
by marc-a.
Hello everybody,

I'm new to s9y and set up my first blog. Now I'd like to tweak it a little bit...
After my first steps (modified the lightbox-plugin to work with lytebox and showing up prev-/next-buttons in an extended entry automatically), I'd like to write a lifeblog-plugin (I own a Nokia N95 and an adequate rate plan to test it). But I need a directory to put some cache-files in it. There are only some dirs (in the s9y-directory-layout) that are writeable for the webserver and none of them seems to be intended to be used as a cache folder. So what's the right place?

BTW: I assume that some plugins would benefit from using a cache...

Kind regards, Marc-Alexander

Posted: Fri Feb 08, 2008 6:07 pm
by judebert
The only directory that's certain to be writeable is templates_c, but that has Smarty stuff in it that you may not want to disturb. (Although the cache plugin does store its files there, so maybe it's not too brittle after all.) Your provider may be able to show you a writeable directory.

The easiest way is probably to store the data in the database instead of the file system. That's how our logging plugins work.

Posted: Fri Feb 08, 2008 7:25 pm
by marc-a.
Hi Judebert,

thank you very much for you reply. Maybe I will create and use a subfolder inside template_c. It's no problem for me to create a new writeable directory; I just wondered what's good practice.

Since files send via lifeblog can be pics and even movies I don't think that storing in the database is an option in this case.

Posted: Sun Feb 10, 2008 12:12 pm
by garvinhicking
Hi!

Real files can of course be stored in the 'uploads' directory - and cache files should go into the templates_c directory, yes. If you expect many cache files, create a subdirectory.

Regards,
Garvin