Welcome Guest, Not a member yet? Register   Sign In
Need a Tiny Caching Method

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?

You seen CI's built in cache library?

[quote author="liamr" date="1276566497"]You seen CI's built in cache library?[/quote]
No, when was added ?

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.

Thanks Jelmer. Very very nice idea. Much more useful than mine.

Theme © iAndrew 2016 - Forum software by © MyBB