2

I need a cache system for PHP that suport tags.

It's will be used caching a lot of queries results, from many users, and every time I will need to clear some user cache, or some module cache...

I thinked, and conclude that tagging are the best way to do that.

Like ('messages_unread_user_300','messages','user_300','unread') it easy to clearup when needed.

I've tried xcache and apc.

Amal G Jose
  • 2,486
  • 1
  • 20
  • 35
Tiago Gouvêa
  • 15,036
  • 4
  • 75
  • 81
  • I don't understand what you mean by "tagging" in this context? – Pekka Sep 15 '10 at 10:45
  • @Pekka: probably for 'remove by tagname' etc., i.e. most caches are straight key=> value pairs, while you might want related data updated or destroyed based on some common denominator. If I need something like that I usually define a 'taglist' as just another key=>value (array) pair. – Wrikken Sep 15 '10 at 10:50

1 Answers1

1

The memcached wiki has a solution that looks like it may fit yours:

http://code.google.com/p/memcached/wiki/NewProgrammingTricks#Namespacing

See "Deleting By Namespace"

Daniel
  • 7,006
  • 7
  • 43
  • 49