Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

Use Django's caching for indexing data caching. #467

Closed
ShawnMilo opened this issue Aug 4, 2015 · 1 comment
Closed

Use Django's caching for indexing data caching. #467

ShawnMilo opened this issue Aug 4, 2015 · 1 comment
Assignees

Comments

@ShawnMilo
Copy link
Contributor

As an upgrade to #460, use Django's built-in caching (with its expiration support to replace the dicts in search/search_indexes.py.

This will make the code simpler. This may also mean replacing the ALLOW_CACHING setting that was added in that PR in favor of a CACHE_TIMEOUT setting used to populate the Django caching TIMEOUT setting. This would be zero (no caching) by default and could be changed as appropriate in production.

@ShawnMilo ShawnMilo self-assigned this Aug 4, 2015
@ShawnMilo
Copy link
Contributor Author

At @carsongee's recommendation, we should also add tests to this improvement PR which ensure the number of DB queries goes down. This can be accomplished with assertNumQueries.

ShawnMilo added a commit that referenced this issue Aug 7, 2015
Closes #467.

Improves upon PR #460 by getting rid of a "global" variable and
a custom settings.py value. Also adds tests which confirm that
fewer queries are done when the caching is used.
ShawnMilo added a commit that referenced this issue Aug 11, 2015
Closes #467.

Improves upon PR #460 by getting rid of a "global" variable and
a custom settings.py value. Also adds tests which confirm that
fewer queries are done when the caching is used.
ShawnMilo added a commit that referenced this issue Aug 11, 2015
Closes #467.

Improves upon PR #460 by getting rid of a "global" variable and
a custom settings.py value. Also adds tests which confirm that
fewer queries are done when the caching is used.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant