Ankit Goel
Ankit Goel

Reputation: 6505

How to disable cache in Vapor?

The changes I make to the leaf templates are not being shown in the browser. I think it's because Vapor is caching the template. How do I disable caching?

Upvotes: 0

Views: 271

Answers (1)

Ankit Goel
Ankit Goel

Reputation: 6505

In Vapor 2:

drop.view.shouldCache = false

For Vapor 1:

(drop.view as? LeafRenderer)?.stem.cache = nil

Upvotes: 2

Related Questions