Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fields to cache #64

Open
zakkolar opened this issue Nov 11, 2024 · 1 comment
Open

Add fields to cache #64

zakkolar opened this issue Nov 11, 2024 · 1 comment
Assignees
Labels
good first issue Good for newcomers

Comments

@zakkolar
Copy link

Hi!

I'm using the plugin to generate several different feeds for the same pages. One is for standard feed readers, and several others are for cross-posting to other places. Each feed uses different fields for the URL and description depending on the purpose of the feed. (e.g. some feeds get the entire content of the page as the description, others get a shorter excerpt, etc.)

Since modifiedHashFromKeys() only factors in the snippet value and the modified dates from the pages, feeds that are populated from the same list of pages share the same cache key even if they output different fields. This means all the variations display the cached version of whichever feed is loaded first rather than rendering their own.

Would it be possible to include more of the options in the modified hash to ensure each variation gets its own entry in the cache? For my specific purposes, just the urlfield and textfield would be enough. But for more general use-cases, it might make sense to include others as well.

@bnomei bnomei self-assigned this Nov 28, 2024
@bnomei bnomei added the good first issue Good for newcomers label Nov 28, 2024
@bnomei
Copy link
Owner

bnomei commented Nov 28, 2024

New plugin v5 (matching the soon-to-be-release Kirby v5) has improved caching and takes the feed URL into account, which should be unique in your use case.

Despite being flagged as v5, you can use the plugin with k4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants