News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

APress.com:
Quick Caching With PHP Sessions
August 07, 2006 @ 06:30:48

In an excerpt from the APress book "Beginning Google Maps Applications with PHP and AJAX: From Novice to Professional", this entry talks about caching the responses from a remote data source into the $_SESSION superglobal during development.

Why spend time setting up a sophisticated cache for the whole responses while you develop your XPath expressions and regexes? Especially if you ultimately will only be caching the results of these actions?

One solution is to simply store the responses in the PHP variable $_SESSION, and then read them out again on the next viewing. To make it even easier, you can just wrap your remote calls in some code that checks it for you.

Their "weapon of choice" is cURL using a wrapper class (specifically this one from Sean Hunter) around it to amke the connection and cache the results. They also include the source of the script as an example.

0 comments voice your opinion now!
caching sessions remote data source curl wrapper caching sessions remote data source curl wrapper


blog comments powered by Disqus

Similar Posts

Nexen.net: Sudoku in PHP

DevShed: Iterators in the Simplest Sense - Traversing Different Data Structures

Gonzalo Ayuso's Blog: Using a stream wrapper to access CouchDb attachments with PHP

PHPMaster.com: Data Structures for PHP Devs: Trees

PHPBuilder.com: Securing Data Sent Via GET Requests


Community Events





Don't see your event here?
Let us know!


laravel zendserver list introduction interview framework bugfix community code deployment api tips threedevsandamaybe release podcast voicesoftheelephpant symfony development series language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework