5

I've just built a site using codeigniter and mysql. It works great, but I want to turn the database caching on. I figured I would just do it globally rather than caching each select statement manually. in my database config file, I set 'cache_on' = TRUE and then for the 'cachedir' = "http://www.mydomain.com/application/cache/dbcache"

I set the whole cache directory as writable, so I think everything is set up correctly. After loading a few pages, I looked back into the cache directory, and it's still empty. I'm assuming that means that nothing was cached. Am I missing something? I'm not getting any errors and all my select statements are showing the results. What am I doing wrong / and how can I tell if the caching is working?

Thanks!

1 Answer 1

12

You need to use a relative path, not a url.

Try changing cachedir to application/cache, like so:

$db['default']['cachedir'] = 'application/cache';
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.