Skip to content

Different timeout for different querysets #394

@weblloyd

Description

@weblloyd

I want to cache COUNT on 12 hours and FETCH and other querysets on 1 hour for one model (catalog.item).

Can this be done through the settings or another way or not?

This does't work:

CACHEOPS = {
   'catalog.*': {'ops': {'get', 'fetch', 'aggregate', 'exists'}, 'timeout': 60*60},
   'catalog.item': {'ops': {'count'}, 'timeout': 60*60*12}
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions