Welcome Guest, Not a member yet? Register   Sign In
Caching Functions
#13

[eluser]vlad_ci[/eluser]
@Flesha
It appears that you want to cache 'results of function calls',
not functions.

You then have to decide if your caching is for a specific user
or system wide.

Caching for specific user can be done using PHP native session support
or code igniter session library (but my understanding that code igniter
session library, since it is based on cookies can only store 4 bytes)




System wide caching should be done using one of the PHP caching mechanisms
There was a person here on the forums who created
khcache small library. Search for it, it should help to get things going.
It can use either APC (which is now a separate module but will be part of
PHP in 6.0) or memcache.


All the caching strategies in PHP use a basic mechanism of taking a result that you want to cache, making it
into a string, and then storing that string somewhere in a file or memory of
another process.

I am new to PHP but in my research,
there is no way to do what you would typically do in state-full systems
where you could instanciate class (functions and data) and keep it in
Process memory for as long as needed.


Messages In This Thread
Caching Functions - by El Forum - 09-08-2008, 10:32 AM
Caching Functions - by El Forum - 09-09-2008, 09:10 AM
Caching Functions - by El Forum - 09-09-2008, 09:38 AM
Caching Functions - by El Forum - 09-09-2008, 09:41 AM
Caching Functions - by El Forum - 09-09-2008, 10:49 AM
Caching Functions - by El Forum - 09-09-2008, 10:57 AM
Caching Functions - by El Forum - 09-09-2008, 11:14 AM
Caching Functions - by El Forum - 09-09-2008, 03:17 PM
Caching Functions - by El Forum - 09-09-2008, 08:30 PM
Caching Functions - by El Forum - 09-09-2008, 10:55 PM
Caching Functions - by El Forum - 09-10-2008, 09:01 AM
Caching Functions - by El Forum - 09-10-2008, 09:24 AM
Caching Functions - by El Forum - 09-10-2008, 09:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB