PHP Classes

Cache the query result

Recommend this page to a friend!

      Extended MySQLi  >  All threads  >  Cache the query result  >  (Un) Subscribe thread alerts  
Subject:Cache the query result
Summary:Cache the query result
Messages:3
Author:charles
Date:2014-07-02 14:38:41
Update:2014-07-03 11:55:45
 

  1. Cache the query result   Reply   Report abuse  
Picture of charles charles - 2014-07-02 14:38:41
How make query cache?

"If the query takes just too long, you can cache the query result into an XML file"


Thanks

  2. Re: Cache the query result   Reply   Report abuse  
Picture of Camilo Sperberg Camilo Sperberg - 2014-07-02 23:00:22 - In reply to message 1 from charles
Hi Charles:

Sadly enough, the PHPClasses site does not read the contents from the standard README.md file, but that option has been wiped out this class since a very long time already (a year or so), so I'm sorry for that. I will update the documentation on this site.

The good news though, is that I've also wrote a CacheManager class which should complement this one. This class is available in Github:
github.com/unreal4u/cacheManager
And will allow you to use one or more cache types. At the time being, only APC and file-system based cache is supported.
For better cache implementations (cacheManager was only a playground to check on what could be done with Reflection), I suggest taking a look at ZendCache (https://packagist.org/packages/zendframework/zend-cache) or any other (https://packagist.org/search/?q=cache) which will do stuff way better than my own.
The decision was based on the idea that a database wrapper should only do database stuff, while caching should be done by a proper cache wrapper. This helps keeping clean, testable and easy to understand coding standards.

As we're on it, I would also recommend checking out the latest version of this class on Github, as all the development occurs there:
github.com/unreal4u/db_mysqli

Greetings.

  3. Re: Cache the query result   Reply   Report abuse  
Picture of charles charles - 2014-07-03 11:55:45 - In reply to message 2 from Camilo Sperberg
HI Camilo

Many thanks for the response and attention! I'll take a look at your CacheManager.

I'll support Holland on 05/07 after that.

Greetings from Brazil