On Thu, 6 Jan 2005, William Lovaton wrote: > Hi Rasmus, > > El lun, 03-01-2005 a las 14:13 -0500, Rasmus Lerdorf escribió: > > If you need to do something fancier you can stick things in shared > > memory. Many of the accelerators give you access to their shared memory > > segments. For example, the CVS version of pecl/apc provides apc_store() > > and apc_fetch() which lets you store PHP datatypes in shared memory > > directly without needing to serialize/unserialize them. > > This is great. In my high performance web app I created a PHP library > that abstracted this to use several backends. For instance I have a > File backend and a SHM backend that uses the functions provided by the > sysvshm PHP module. With this functions, do they need to > serialize/unserialize every time I put/get something in/from the cache?? If you are doing this in user-space PHP, then yes, you will have to serialize. > Also I use sysvsem for locking capabilities. does apc take care of the > locking? does it have an API to do that? APC takes care of locking and all cache management. > My experience with shared memory have been great. My production server > uses a segment of 384MB to cache lots of resultsets and PHP objects and > the performance is almost unbeatable... well if it serializes then > pecl/apc will give better performance I guess. It should, yes. Try it. -Rasmus
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php