Page MenuHomePhabricator

Investigate cache purging needs
Closed, ResolvedPublic

Description

One of the things that came up as something that needs further investigation for the mobileapps/RESTBase deprecation is cache purging and RESTBase.
Specifically:

  • We need to figure out how/when RESTBase evicts the cache
  • If RESTBase is aware of cache purging events
  • How can this functionality be reproduced in an architecture without RESTBase

Event Timeline

After some investigation it looks like:

  • Cache invalidation is done using events handled in changeprop
  • When RESTBase encounters a request with cache-control: no-cache it rerenders the content.

For a list of changeprop rules that send cache invalidation requests:

There is an open discussion around using a standalone instance of benthos near mobileapps service to handle events in order to move away from the changeprop centralized handling.
Are there any updates on that @Joe ?

There's a related conversation about tools for managing deploys and rollbacks -- it would be useful to have robust tools for purging the cache of content generated by the 'rolled back revision' when a rollback is needed during a deploy.

After deciding the interim step for restbase sunset and PCS to be reusing cassandra and changeprop the current plan is to re-use changeprop and instead send pregeneration HTTP requests to PCS. Should we go ahead and close this one?

That said, we can also use benthos with HTTP client as output (pretty much what changeprop is doing).

That said, we can also use benthos with HTTP client as output (pretty much what changeprop is doing).

It's up to you. I see benthos as a nice to have since it's new technology, however, we have always implemented new technologies to avoid tech debt and that have proven to be a solid strategy. Either way is fine for me.

After deciding the interim step for restbase sunset and PCS to be reusing cassandra and changeprop the current plan is to re-use changeprop and instead send pregeneration HTTP requests to PCS. Should we go ahead and close this one?

Agreed.