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

[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?
#2

[eluser]liamr[/eluser]
You seen CI's built in cache library?
#3

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

[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.
#5

[eluser]Mareshal[/eluser]
Thanks Jelmer. Very very nice idea. Much more useful than mine.




Theme © iAndrew 2016 - Forum software by © MyBB