Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.


edited October 2007 in Vanilla 1.0 Help


  • Uploaded version 0.0.1 of SimpleCache.
  • Has any one tried this yet? Your thoughts please?
  • I think it's great. (pfff) The most important thing is to cache the good pages. An example. SC can be told to cache pages for guests only. This could be a bargain for big public forums since there is one file for all the different guests. When authenticated, you'll be served your files. Another one. It could be interesting to cache index.php and categories.php even for authenticated people, with quite long expiration times (like 5mn) since they are quite db intensive, and there is no urge to see the updates. Caching comments.php for authenticated people is quite annoying since they won't see their own posts immediatly. Now I'm planning invalidation if POST data is submitted (WallPhone again).
  • Uploaded version 0.0.2 of SimpleCache.
  • Just deleted a sentence in the readme.txt that made a reference to the beginnings of the TimeKeeper extension (that was presiously part of SimpleCache). Whether SC is installed normally or the hacky way, time is taken from the same reference now.
  • Grahack, this extension has been a great help to my site. I've done a lot of very custom extensions on Vanilla and was starting to get very slow page loads. This did the trick for unauthenticated users--thanks!

    Given it's a 0.0.2 release, do you have further plans for developing the extension? What additions did you have in mind?
  • * a manual button that administrators can click to empty the cache * some work on the header sent for the browsers to cache the page for the same duration than we cache it on the server * make other things "page dependant" like expiration time is: closing tag, display expiration time, maybe some other things yet unknown * clever invalidation and if you have other ideas...
  • Those sound great.

    Anything that allows for 'object-level' caching of elements of a page would be very welcome if it were as easy as the role-based configuration that already exists.

    It would great if I could just specify an object in the config file and then specify how long it's supposed to be cached.

    I'm not familiar enough with Vanilla's order of execution to know if that's viable, but thought I'd throw the idea out there anyway...
  • What do you mean 'object level'? Like caching just the source echoed by an extension, or a page control object like $Head, $Panel...
  • I started to use Simplecache, and was wondering if somethings can be explained--- what exactly is it caching? and does the add-on work right out of the box?

    If someone posts to a discussion, and my cache is set for 10 mins, does that mean it will be 10 mins until I see the updated discussion? This is how I assume a cache to work, but it doesn't appear to be behaving like that... I might be looking at things wrong.

    Also how do you make it cache for both authenticated users and guests?
  • It is caching the entire generated page. It mostly works out of the box, but by tweaking the configuration you can better tune it to your needs.

    I believe a new comment will invalidate the existing cache, so it would be rebuilt on the next page load. It already caches for both authenticated and guests, since each may see a very different page.
  • Just follow the readme!
    Basically you'll just have to rename the settings_demo.php file to settings.php.
    And no, sorry Wanderer, It is 'simple' because cache invalidation is only temporal. A cache file will
    continue to be served until it expires, no matter if the data displayed is obsolete
    But yes, there are different files for different users, and one file for every guest (and different files for different requests of course).
  • wow, this is an excellent idea!
  • This should be updated to immediately invalidate a discussion's cache file when the user makes a post. This is the biggest usability problem, otherwise this is great.
  • Thanks for your interest ggaudrea. Problem is, there are other pages to invalidate: the home page (discussion moved at the top, comments count, last user...), the category one. I thought about this once, deeply, and couldn't arrive to something easy. If you have ideas (and implementations), I'd be happy to grab them.
Sign In or Register to comment.