Hello all, Its been a long time since my last post. Hmm… Time won’t be much better rather than now to introduce my simple PHP cache library – Pettakam
I named it after a tamil word ‘Pettakam’ meaning ‘Treasure Box’. Correct selection of word, indeed!
You can get the library here : https://github.com/vimalsudhan/pettakam
This cache library is effective, if you don’t have memcache or any cache server and you are running large DB queries (with lot of joints) which can be cached. This library makes use of filesytem to cache your variables, which will be faster compared to running queries in a relatively large Database.
Like in a cache server, you can set expiration time for your cached variables, can cache any datatype(numeric,string,arrays,objects) except resource-type, check cached and clear any or all cached.
As a step further for cache control, you can group your cached variables into ‘groups’ and you can clear a set(group) of cached ones. This is useful when there is a ‘UPDATE’ and a set of cached variables are affected & needs updation.
Please read through README at https://github.com/vimalsudhan/pettakam with examples and howto-s.
Its been there for a year and I am using it my codes both personal and professional 🙂 So, its hands down to say it works.
Hoping to publish more of my codes at https://github.com/vimalsudhan. Time will say…!