> Uhh... good point, except that I don't trust the Cache code.  The AUTHOR
> isn't ready to put his stamp of approval on the locking/updating.

That sort of hesitancy is typical of CPAN.  I wouldn't worry about it.  I
think I remember Randal saying he helped a bit with that part.  In my
opinion, there is no good reason to think that the Apache::Session locking
code is in better shape than the Cache::Cache locking, unless you've
personally reviewed the code in both modules.

> I'm
> running 10 hits/sec on this server, and "last write wins," which
ELIMINATES
> other writes, is not acceptable.

As far as I can see, that's all that your code is doing.  You're simply
locking when you write, in order to prevent corruption.  You aren't
acquiring an exclusive lock when you read, so anyone could come in between
your read and write and make an update which would get overwritten when you
write, i.e. "last write wins."

You're more than welcome to roll your own solution based on your personal
preferences, but I don't want people to get the wrong idea about
Cache::Cache.  It handles the basic locking needed for safe updates.

- Perrin



Reply via email to