Skip to content

Conversation

@DiegoPino
Copy link
Member

@DiegoPino DiegoPino commented Dec 22, 2023

See #395

This has been tested a lot. But I will give my today's self a bit of slack, test again later tonight and merge. Solves the issue with Anonymous users from a different IP/Network seen a stale cache generated by other anonymous users + makes also cache more robust on all viewers + brings to 2023 the simpler image formatter nobody uses (a "classic")

bool, true == cacheable result, false == we won't cache. Used to add extra info outside / at the caller level. e.g cache-time, etc.
For anonymous users, and in the presence of IP embargo metadata we opt out of caching. This was tested several times by forcing drupal messages (when no caching is enabled any hit on a page that contains non cacheable ADOs will show a message and also stop any further caching) and checking headers
Every formatter now has the right context/tags but also

if (isset($embargo_info[4]) && $embargo_info[4] === FALSE) {
      $elements['#cache']['max-age'] = 0;
    }

to ensure that browsers don't keep anything around (for those moving in/out of campus wide IP allowances/restrictions)

also some smaller cleanups
@DiegoPino DiegoPino added bug Something isn't working enhancement New feature or request metadata Meta(l) data IIIF Specs/Manifests/Implementations Field Formatter The thing that glues the pieces and adds glitter Drupal 10 Upgrade economy Documentation Embargoes Heart Shaped boxes labels Dec 22, 2023
@DiegoPino DiegoPino added this to the 1.3.0 milestone Dec 22, 2023
@DiegoPino
Copy link
Member Author

This needs also a re-roll for 1.2.0

@DiegoPino DiegoPino merged commit 7e95fa6 into 1.3.0 Dec 24, 2023
@DiegoPino DiegoPino deleted the ISSUE-395 branch July 24, 2025 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Documentation Drupal 10 Upgrade economy Embargoes Heart Shaped boxes enhancement New feature or request Field Formatter The thing that glues the pieces and adds glitter IIIF Specs/Manifests/Implementations metadata Meta(l) data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants