[UPHPU] Class and Object Storage

Justin Giboney giboney at giboneydesigns.com
Sun Feb 17 12:37:51 MST 2008

Walt Haas wrote:
> I'm trying to understand what you want to do.  From what you said I'm 
> guessing that you want a portable way to generate unique keys for a 
> cache, and are looking to some implementation of UUID to do this. [see 
> http://tools.ietf.org/html/rfc4122]
I already have that GUID/UUID part, see 
http://www.expresslanevideo.com/docs/guid.txt (I am sure there are 
better implementations, and I am open to suggestions.)

The problem I am having is easy implementation for a web based system. 
For version 1.0, I was using memcached to hold this object between 
users/browsers/sessions for up to 30 minutes after the last hit, so that 
I would only have one object available to all users.

There are two problems with this implementation
(1) memcached introduces more complication to the programmer **
(2) not all web hosts support memcached (although I asked blue host last 
night if they do and they said yes)

I have updated this class to be a singleton class because of the 
efficiency of the singleton programming pattern, but that doesn't help 
with holding objects between users/browsers/sessions, because the web 
server seems to drop all classes and objects after each page load.

** Note: I just thought of a way to help with this, I could memcached 
code into the class to reduce complications for the programmer. This 
doesn't help with the second point though.

Thank you,

Justin Giboney

More information about the UPHPU mailing list