[erlang-questions] how: Purging old records from Mnesia table
Scott Lystig Fritchie
fritchie@REDACTED
Fri Mar 7 03:56:41 CET 2008
A few messages ago, someone said:
>> > Hence it is enough to use timer:send_after()
Gleb Peregud <gleber.p@REDACTED> wrote:
gp> I'm working on simple caching server. Allowing to specify if and
gp> when item will expire.
When having the expiration even sent by a 2nd party, you must avoid race
conditions somehow. Example:
Store tuple {Key, Value0}, expires at time T.
Time T arrives
Client stores {Key, Value1}, expires at time T2
Server deletes Key
Client attempts to fetch Key, fetch fails, client is sad.
-Scott
More information about the erlang-questions
mailing list