Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-remove old gateways and queries #35

Open
CasperWA opened this issue Mar 8, 2021 · 1 comment
Open

Auto-remove old gateways and queries #35

CasperWA opened this issue Mar 8, 2021 · 1 comment
Labels
Caching Issue or PR related to caching enhancement New feature or request

Comments

@CasperWA
Copy link
Member

CasperWA commented Mar 8, 2021

In order to remove old gateways and queries, this can be done using a TTL index on last_modified.

More information on a TTL index can be found here.

@CasperWA CasperWA added enhancement New feature or request Caching Issue or PR related to caching labels Mar 8, 2021
@CasperWA
Copy link
Member Author

CasperWA commented May 7, 2021

Furthermore, the auto-removal of gateways should rely on usage of said gateway. I don't know if MongoDB has a way of setting up a TTL index to rely on when a document has been retrieved as well or if one has to update the last_modified each time a gateway resource is retrieved from the database? This would have to be updated through the Python code and the motor client.

On the other hand, it might also make sense to cycle gateways after X time no matter what? The main reason here is to keep the databases "fresh", should the base URL change (for whatever reason) or any other information stored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Caching Issue or PR related to caching enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant