Need a Tiny Caching Method |
[eluser]Mareshal[/eluser]
I need a simple caching method, without using a complicated caching script or something. I need this especially for site settings, and then I might extend this if it works. I was thinking to get all data from DB, and put all them into a hidden file, with a random generated name. Then, when I update the settings, just update the database, and in the same time the file. Would this be a good idea?
[eluser]Mareshal[/eluser]
[quote author="liamr" date="1276566497"]You seen CI's built in cache library?[/quote] No, when was added ?
[eluser]Jelmer[/eluser]
Take a look at this topic, the _export_preferences() function I described there. I took the approach of generating a normal config file from the DB, which can be (auto-)loaded like any normal config file for usage.
[eluser]Mareshal[/eluser]
Thanks Jelmer. Very very nice idea. Much more useful than mine. |
Welcome Guest, Not a member yet? Register Sign In |