[wp-hackers] XCache Variable Storage vs. WP Object Cache

Computer Guru computerguru at neosmart.net
Sun Sep 16 10:24:10 GMT 2007


OK, this is what I'm doing currently looks like:

set_data:
check if is_object() or is_callable()
if true, serialize.
check if is_resource      (resource is the only thing that is not safe
to serialize... )
if true, don't cache
else store it as-is

get_data:
check if data is_serialized_object()         (custom function)
if true, unserialize and return
else just return


While I don't get a PHP access violation right away like I used to
(before anything even loads), I still get an access violation mid-way
through the page load.


Anything else I can/should try?

On 9/16/07, DD32 <wordpress at dd32.id.au> wrote:
> On Sun, 16 Sep 2007 19:31:09 +1000, Computer Guru <computerguru at neosmart.net> wrote:
> > Only thing I can think of is this warning on the XCache site:
> > Warning : At the moment, It is not possible to store resources,
> > callbacks or objects using xcache_* functions.
> >
> >
> > Does WP Object Cache attempt to cache any of these? If so, is there
> > any way of stopping it from doing so?
>
> Theres quite a few Objects being stored in the Object Cache :)
> I dont think any Resources are attempted for caching, and i'd be unsure about callbacks.
>
> using serialize() should convert everything into a string for storing though.
>
> > Thanks.
> >
> > On 9/16/07, Stephane Daury <wordpress at tekartist.org> wrote:
> >>
> >> /me loooove memcache
> >>
> >> But I wish php/memcache would allow for:
> >> - regex for keymapping
> >> - tag keys like done in the Zend Framework
> >>
> >> Stephane
> >>
> >>
> >>
> >> On Sep 16, 2007, at 3:32, Tom Barta wrote:
> >>
> >> >> But it is almost always going to be faster to use a memory-based
> >> >> object storage engine than the built-in file-based method, as
> >> >> retrieving data from memory is orders of magnitude faster than
> >> >> retrieving data from a hard disk.
> >> >
> >> > I don't have any hard numbers at the moment, but I was playing with
> >> > memcache at one point and discovered something surprising (and
> >> > disheartening about PHP);  Caching arbitrary objects with memcache
> >> > (within a single request) was faster than using a PHP associative
> >> > array as a cache!  Memcache is wicked fast.
> >> >
> >> > --
> >> > Tom
> >> > _______________________________________________
> >> > wp-hackers mailing list
> >> > wp-hackers at lists.automattic.com
> >> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> >> _______________________________________________
> >> wp-hackers mailing list
> >> wp-hackers at lists.automattic.com
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> >
> >
>
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


-- 
Computer Guru
Director,
NeoSmart Technologies
http://neosmart.net/blog/


More information about the wp-hackers mailing list