regarding what to cache???
Chris Goffinet
goffinet at yahoo-inc.com
Tue Sep 4 06:18:23 UTC 2007
The mysql_query function returns a 'resource' handler, which you can
not store in memcache.
Try this:
$query = mysql_query("SELECT * FROM ....");
$result = mysql_fetch_assoc($query);
$memcache_obj->set($key,$result);
Chris Goffinet
goffinet at yahoo-inc.com
On Sep 3, 2007, at 11:05 PM, Ajinkya Nahar wrote:
> Hi,
>
> I am working on a PHP Mysql application.
> I wanted to ask that can we cache the result set returned by a
> particular query into memcached?
> If yes, can we fetch the same result set from memcached and use it
> without database connection?
>
> E.g.
> $query = SELECT * from
;
> $result = mysql_query($query);
> $memcache_obj->set($key, $result);
>
> Will this work??
>
> Please let me know your comments.
>
> Regards,
> Ajinkya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20070903/ddecc442/attachment.htm
More information about the memcached
mailing list