[EXTDAM-287] Provide a command for flushing a cache by name Created: 12/Oct/20  Updated: 26/Aug/22

Status: Open
Project: External DAMs
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Richard Gange Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: cache, command, quickwin
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by EXTDAM-166 [ADCOM-6] Flush cache action for the ... Open
relation
is related to MGNLCACHE-231 Improve cache debug/trace logging Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: AuthorX Support
Team: AuthorX

 Description   

I'm not able to refresh the view to see assets that might have been uploaded through the s3 management console. I have to restart and reconnect to refresh the view.

Reproduce

  • Install the s3 external dam connector.
  • Open the dam app.
  • Upload a new file through the AWS console.
  • Observe the new file is not available.

Expected
There should be a way to refresh the view. Ether by action or closing and reopening the app.

AC
Create command in magnolia-addon-commons-cache module that allows flushing cache by name

Workaround options
Cache expiry configuration can be adjusted:

cacheConfigurations:
  s3:
    caches:
      s3-objects: maximumSize=500, expireAfterAccess=10m
      s3-buckets: expireAfterAccess=60m 

See External DAM module - configuring the cache.

With a groovy script:

import info.magnolia.objectfactory.Components
 
cacheManager = Components.getComponent(info.magnolia.addon.commons.cache.CacheManager)
cacheManager.evictCache("s3-objects")
println "s3 cache cleared"

Generated at Mon Feb 12 01:53:43 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.