New Feature: Allow Staff to clear Added Content cache
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
When staff update identifiers in records, or upstream providers update content, the ability to clear the previous cache entries would come in handy. The branch below adds a clearcache "type" to the Added Content Module. The "format" provided should either be "all" to clear all types or an Added Content type (such as "jacket" or "summary") to clear.
I wrapped AuthHandler blocks around the new clearcache URLs in Apache requiring STAFF_LOGIN to avoid unauthenticated use of the new feature.
I also put a simple link in the catalog when viewed in a staff context to clear the Added Content cache for the current record. From a purely utilitarian point of view the link works. From an end-user point of view we may want to change the wording, add an icon, move it to another location, etc. Adding a "just jacket images" link may also be desired, depending on what people see as use cases.
Changed in evergreen: | |
assignee: | nobody → Josh Stompro (u-launchpad-stompro-org) |
Changed in evergreen: | |
milestone: | 2.9-alpha → 2.9-beta |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Tested on SB1 using record 45(The piano concertos., Chopin) which already has some jacket art. Loaded the record in the opac and viewed the small/medium/large versions of the jacket to get them all loaded into memcached. There is no large jacket art for that record... just noticed.
Changed the ISBN to something else with different jacket art. Tested to make sure the orig covers will still displaying from memcached, they were.
Clicked on the "Clear AddedContent Cache" link and saw the report that the medium and small cover art had been deleted.
Reloaded the record in the opac and saw the new jacket art. So it looks like it works just fine.
I tried on my own test system yesterday along with some other branches, including "#1449709 support caching of compiled Template Toolkit templates " and I couldn't get it to work. The cache just wasn't actually cleared when I ran it, so that might be something else for someone to test it against.
Josh