Skip to content

Crumbs cannot invalidate clients cache #2

Description

@horazont

Right now, crumbs are not taken into account when calculating the Last-Modified date of the response. This is due to the fact that we cannot determine which crumbs will be used in a response until it is rendered completely. Rendering being the most expensive part, we obviously want to avoid it as far as possible.

Sadly, this is in conflict with proper un-caching on the client side. We'll have to at least allow the user to declare crumbs which will for sure be used and should be taken into account. We could also try to do static analysis on this one, by parsing the templates by hand. Using a conservative approach, it should be possible to extract the used crumbs in all used templates. To not break things, invalid crumb IDs must be ignored here.

We then could ask these crumbs for a (yet to be defined) LastModified property which can be taken into account. Nodes could also get a possibility to specify crumbs which they are embedding, if any.

This yields an out-of-date navigation on zombofant.net when someone posts a new blogpost, which is bad (cause the post won't be seen until the user does a hard reload). Workaround: Touch some template which is used on all pages.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions