note 109862 added to memcache.set
| From: | aamthor at advertzoom dot de | Date: | Wed, 29 Aug 2012 08:27:07 +0000 |
| Subject: | note 109862 added to memcache.set | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-190254@lists.php.net to get a copy of this message | ||
to put some things right:
max expiration time: RTFM, it's written here.
max amount of data: almost unlimited as long as your server can bear it.
speed and pace:
well, thats another thing. We had a couple of data records which for application reasons must be
kept in memory. Since the bunch of data is big and doesn't change very often, we considered
caching it to memcache instead of retrieving it from the DB each and every time.
This isn't a general advice nor any quality statement, but we did a couple of tests with
serialized arrays (50 MB), compressed and uncompressed and it turned out that in our particular
scenario, memcache is much slower than the DB (mySql).
In general, one can not predict on the behavior of memcache in certain scenarios but always need to
make some testing and benchmarking upfront before starting to deploy things to a live system.
Despite of the tests above, we are still using memcache for session caching instead of file system,
since there are certain other things to consider and the amount of data is always small (few KB)
----
Server IP: 87.106.1.137
Probable Submitter: 213.23.218.98
----
Manual Page -- http://www.php.net/manual/en/memcache.set.php
Edit -- https://master.php.net/note/edit/109862
Del: integrated -- https://master.php.net/note/delete/109862/integrated
Del: useless -- https://master.php.net/note/delete/109862/useless
Del: bad code -- https://master.php.net/note/delete/109862/bad+code
Del: spam -- https://master.php.net/note/delete/109862/spam
Del: non-english -- https://master.php.net/note/delete/109862/non-english
Del: in docs -- https://master.php.net/note/delete/109862/in+docs
Del: other reasons-- https://master.php.net/note/delete/109862
Reject -- https://master.php.net/note/reject/109862
Search -- https://master.php.net/manage/user-notes.php