in reply to Concurrent Cache Pattern
Kiss!
Say /usr/shared/appname/cache/xxxxxx/
They get back a single name that is the answer to the question.
If the readers need to be able to tell how fresh the answer is, they can stat the modified time.
No locking involved.
No locking involved.
If the answer is too big to fit into a directory name, then use a file with a well-known name.
This requires the readers to retry if their attempts to open or read fail.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Concurrent Cache Pattern
by pileofrogs (Priest) on Aug 07, 2012 at 20:59 UTC |