Hacker News new | past | comments | ask | show | jobs | submit login

dogpile.cache [1] implements this pattern (or at least a very similar pattern) for both memcache and redis using locks. If the cache value doesn't exist, attempt to acquire the lock and generate the value. If the lock can't be acquired, wait until it frees then check for the value again.

[1] https://dogpilecache.sqlalchemy.org/en/latest/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: