Skip to content

Metascraper cache Cassandra migration front#5616

Ben requested to merge feat/metascraper-cass-cache-f5616 into master

Ticket(s) / Related Merge Requests

front#5616 (closed)

Summary of Changes

Migrates Metascraper cache from Redis to Cassandra.

Testing Considerations

Test Metascraper works - on making a request, you can enter into the Cassandra pod's cqlsh tool:

kubectl exec -it cassandra-0 cqlsh

Then run SELECT * FROM minds.metascraper_cache; to get all cache entries.

Make a request on the sandbox, running the select query above the rows should increment, the request should load quicker.

Feel welcome to run TRUNCATE minds.metascraper_cache; to clear all rows when testing. May help you see an individually added row.

Purging cache

Check cache can be purged also with the (DELETE) /api/v3/rich-embed/purge?url= endpoint - note though you must be logged in.

There is a request in postman at Metascraper Server > Engine cache purge sandbox - you will need to authenticate first, then copy your XSRF token over to the request cookies to make it work.

Deployment Considerations

Table needs adding to Cassandra

Configure this->config->get('metascraper')['ttl_seconds'] to your desired TTL - currently set to 1 week by default.

Regression Scope

Affects Metascraper

Platform Affected (web, mobile, etc)

Engine.

Developer Testing Completed

Manual and unit.

Screenshots / Screen Recording

simplescreenrecorder-2022-08-02_13.04.03

Does this impact

  • Localization
  • Dark/light mode
  • Guest mode

Definition of Done Checklist

  • The Acceptance Criteria has been met
  • Code is tested: Testing includes unit/spec, E2E/automated and manual testing
  • Merge requests description has been filled out
Edited by Ben

Merge request reports