two dimensional arrays in memcache
Jason Edgecombe
jedgecombe at carolina.rr.com
Mon Oct 9 13:11:18 UTC 2006
You're already on the right track.
$key = "bookmark_" . $_GET['page'] . "_" . x . "_" . y . "_" . z;
where x, y, and z are different dimensions. Just keep adding "_" or some
other character between dimensions.
Jason
Johannes Fosseus wrote:
> Hi
>
> The memcache is kind of fantastic but I have had a big problem the
> last week, please some advice about two dimensional arrays in
> memcache!
>
> I'm desperately trying to do something like this in order to be able
> to delete the whole group (region): I need this to delete the cached
> array in a person's mailbox if the person delete a single mail in for
> example page 5.
>
> Pseudo code in php:
> $key = bookmark_".$_GET['page'];
> $memcache_main_obj->set($key, $memcache->set($key, $items, false, 0),
> false, 0);
>
> The idea is to save all the "pages" data in a two dimensional array, I
> have been reading some about this on the list but cant find out how to
> get things done.
>
> So, if anyone could write down a small php example I will go from
> there by myself.
>
> Thanks a lot - regards / Johannes.
>
>
>
>
> --------------------------
> Johannes Fosseus webbmail
> www.poeter.se
>
More information about the memcached
mailing list