Idea for archive pages (> operator)

Created on 6 August 2023, 11 months ago
Updated 23 March 2024, 3 months ago

Thinking out loud here because I'm not somewhere I can actually try this today, and maybe someone has another idea.

The way the first plugin works is to add an expression to the view query to make certain the chosen field is part of the response and easy to access, then it sorts the provided values, takes the nearest one and uses that as the cache lifetime.

The reason for sorting outside the query is the view may already have an ORDER BY clause and removing or editing conditions from queries is very complex and would be prone to break in my opinion.

The problem with an archive view is that the content which will affect the lifetime of the cache isn't in the returned results. If reversing the polarity of the condition/s for showing entities was possible it would be a reasonably short job to apply the same processing and come up with a value, but I don't think that can be done.

Instead, I think I'll try to use the view query as a NOT IN subquery so I get all of the content that isn't in the returned set. All I have to figure out then is how to build the wrapper query so that it links properly.

🌱 Plan
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia darvanen Sydney, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024