Problems, need help? Have a tip or advice? Post it here.
9 posts Page 1 of 1
Can I ask, how does the cache work?

I've enabled it via the use of the K_USE_CACHE definition - but so far as I can tell, nothing is different.

Thank you
Hi,

Couch serves out cached pages to everybody except admin/super-admin.
Please use a different browser (or log out) and then access your site. The first time, if a page is not yet cached, you'll get a generated page but then onwards the cached copy will be served.
OK, I tried that - still nothing.

How can I tell if it's working?
Where are the cached copies of the pages kept?
Does it need for pretty URLs to be enabled for it to work?
View the source of your page from the browser. Scroll down to the bottom. You should see
<!-- Cached page -->
if the page was served from cache.

The cached files are saved in 'couch/cache' folder. You might have to set appropriate write (777) permissions to this folder if you find that caching is not working.

Hope this helps. Do let me know.
Thanks
OK... is there any way of being able to define the location of the cache folder?

For the same reason as I want the snippets, uploads and config.php outside the couch folder, I would also want the cache folder to be outside it also.

(but, like I said, it still doesn't work for me)
..it still doesn't work for me

So you find your cache folder to be empty? What does your view-source show ('Generated' instead of 'cached')?
Have you made sure you have set proper write permissions? That could be the only problem.
Please let me know. Thanks.
OK, I think I know what the problem was - the /couch/cache folder didn't exist - I created it, and now it appears to be working as intended:

Code: Select all
<!-- Cached page served by CouchCMS (Free Edition) -->


But, as discussed above, I'm going to need the ability to define the location of the cache directory, as I don't want it to be inside the couch directory. Is this possible?
I am glad you got it working :)

As for the GIT issue, the cache folder really is a non-crucial entity (as you have just seen) and you can safely instruct GIT to ignore it altogether by placing '.gitignore' file in 'couch' folder and putting the following line within it:
cache/*.*
within it.
Sure, I realise this - but consider the ability to define the location of the cache folder as a feature request :)

Cheers.

(Keep up the good work, I love Couch, and will no doubt be using it for lots of projects, and will be pressuring my boss into buying licences for each of them)
9 posts Page 1 of 1