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

[eluser]Mirage[/eluser]
I see.

Many options. You could use one of the generic caching libraries out there or something like APC cache extension to php to quickly store temporary values like that. Or you could roll your own. This would share the value across all requests.

If you need to cache it user specific, you can store it in the session along with a timestamp and check that on every request.

Another really 'cheap' option is to set a cookie with with a 10 minute expiration that contains the value. If the cookie is sent you pull the value from there, if not - you run your external request. Again that caches it per user, not for the entire site.

HTH,
-m


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