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

Pass a starttime/endtime-based lifetime to the new CacheTag API #2621

Open
snk-spo opened this issue Feb 24, 2025 · 0 comments · May be fixed by #2622
Open

Pass a starttime/endtime-based lifetime to the new CacheTag API #2621

snk-spo opened this issue Feb 24, 2025 · 0 comments · May be fixed by #2622

Comments

@snk-spo
Copy link

snk-spo commented Feb 24, 2025

You already switched to the CacheTag API for core version 13, in \GeorgRinger\News\Utility\Cache.

This API supports passing lifetimes per tag. You can pass, pseudo-code!, ($news->getStartime() ?: $news->getEndtime()) - $now (only if any is set) to respect the start and end times of news records on-the-fly. Then all news lists and detail pages should automatically respect these enabled fields implicitly without having to deal with TypoScript cache settings or implementing custom solutions.

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

Successfully merging a pull request may close this issue.

1 participant