Where to put cache-files?

Creating and modifying plugins.
Post Reply
marc-a.
Posts: 4
Joined: Mon Feb 04, 2008 3:10 pm
Location: Berlin
Contact:

Where to put cache-files?

Post 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
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
marc-a.
Posts: 4
Joined: Mon Feb 04, 2008 3:10 pm
Location: Berlin
Contact:

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply