as we have a lots of code in our project, using the array-based caching is not very suitable for us as having to manually check too many lines of code.
can the MySQL query result be cached and restored again in form, where I can normally use mysql functions on it? (mysql_num_rows, mysql_fetch_....)
Technical background:
- mysql_query does not return result itself, only a resource id, I need to be able to create such resource from cached data and return its id so it can be used as normal mysql result in php.
As far as found, all caching solutions including memcached etc use to return the data from cache as array and the mysql functions in php do not longer work with such result ( like mysql_num_rows() etc, usually such cached result is already an array and therefore count() has to be used instead). We have lots of queries with VERY complex WHERE and JOIN etc statements having over 10 rows just to find there are currently for example 10 rows matching such criteria and have certain values...
QUESTION: is this actually technically possible? Can PHP recreate such resource from provided data itself?