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.
In reply to Re: Concurrent Cache Pattern
by BrowserUk
in thread Concurrent Cache Pattern
by pileofrogs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |