Skip to content

Commit 372cd65

Browse files
committed
Prevent theses and items sitemap views from using the same cache key #3361
* adds a distinct cache key to the partial used by both the theses and items sitemap view
1 parent 3fd4700 commit 372cd65

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ New entries in this file should aim to provide a meaningful amount of informatio
99

1010
## [Unreleased]
1111

12+
### Fixes
13+
* Prevent theses and items sitemap views from using the same cache key [#3361](https://github.com/ualbertalib/jupiter/pull/3400)
14+
1215
## [2.8.0] - 2024-02-28
1316

1417
### Added

app/views/sitemap/_object.xml.builder

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
xml.instruct! :xml, version: '1.0'
2-
cache 'sitemap', expires_in: 24.hours do
2+
cache cache_key, expires_in: 24.hours do
33
xml.urlset(xmlns: 'http://www.sitemaps.org/schemas/sitemap/0.9') do
44
xml.url do
55
xml.loc root_url

app/views/sitemap/items.xml.builder

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
xml << render(partial: 'object', locals: { objects: @items })
1+
xml << render(partial: 'object', locals: { objects: @items, cache_key: 'sitemap-items' })

app/views/sitemap/theses.xml.builder

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
xml << render(partial: 'object', locals: { objects: @theses })
1+
xml << render(partial: 'object', locals: { objects: @theses, cache_key: 'sitemap-theses' })

0 commit comments

Comments
 (0)