Reputation: 856
Im using memcached php on a web app to control concurrency and blocking, this webapp is used to somehow or other validate pictures with other data
To be more descriptive with the webapp and the purpose of the expiration, this is the logic:
User 1 gets site.com/?pic_id=1, when user get pic_id a reference to that pic and his data related is stored in memcache with a hashvalue and expiration time of 4h to denote that pic_id has been opened and yet not validated, after 1 or 2min the user validates this picture with his data and when is submited the element is removed from memcache. If some user requests the same pic_id while it persists in memcache other pic_id and related data is dispatched. If the user quits browser or requests another pic_id without validating I want that pic_id and his data to be avaiable to another user after 4h..
This is the main reason to me to want all the key that has expired. To dispacth them in expiration order..
Its possible to do that with memcached? Is the problem well focused? Many thanks in advance!
Upvotes: 0
Views: 124
Reputation: 6252
You just cant do it from the client side actually.Instead you could store with data in the array form.
Check this post.It is similar to your question.
Upvotes: 1