Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Caching partials

Hello,

Is it possible to cache only partials in a view ?

How does work the "level" option of the cache method of the view, it's not really clear.

Thanks in advance



486
Accepted
answer

```php{# cache the partial by 1 hour #} {% cache "partial" 3600 %} {{ partial('partial_name') }} {% endcache %}```

I think you could do something like this. That is from the docs http://docs.phalconphp.com/en/latest/reference/volt.html



5.5k

How can I cache a partial if I don't use volt, but phtml templates?



664

Up the question.... Is it possible?