Skip to content

Cached templates that no longer exist #186

Description

@rkocman

Version: 2.4.8

Bug Description

I am not really sure if this is a bug or a feature, but if you render some template with cache enabled and then you remove the source file, the cached version is still being used. I think that this depends on your interpretation of what it means for a cached template to be expired.

Steps To Reproduce

  1. render some template with cache enabled
  2. remove the source file
  3. render the same path again

Expected Behavior

Exception 'missing template file'

Possible Solution

The function isExpired in Latte\Loaders\FileLoader is already being called, however, it only checks the modification time of the source file and not its existence. I can use my own FileLoader that fixes this, but why this isn't somehow possible in default?

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