Skip to content

Serve stale data instead of blocking with lock=True #289

Description

@mrmachine

@cached_as(..., lock=True) can be used to avoid dog-pile effect, but this still results in slow queries as clients wait to acquire lock while cache is being populated (but at least results in lower resource utilisation).

I'd like an option to immediately serve stale data (if available) from the cache instead of blocking while the cache is being populated. This was mentioned in #134 (comment) as the second point of avoiding dog-pile.

Can you give some advice on how to approach this implementation in django-cacheops?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions