Skip to content

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

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions