diff --git a/the-basics/layouts-and-views/views/view-caching.md b/the-basics/layouts-and-views/views/view-caching.md index b1dae4c2..8bf3c17b 100644 --- a/the-basics/layouts-and-views/views/view-caching.md +++ b/the-basics/layouts-and-views/views/view-caching.md @@ -15,8 +15,10 @@ component name="general"{ function index(event,rc,prc){ // call some model for data and put into the request collection + // this data will not be cached, the service will still be called for each request prc.myQuery = getInstance('MyService').getData(); // view with caching parameters + // even if data changes in prc.myQuery, the cached view will be returned event.setView( view="general/index", cache=true, @@ -29,6 +31,13 @@ component name="general"{ } ``` +If you want the data and view cached, you might consider [event caching](/the-basics/event-handlers/event-caching) + + + + + + ## Purging Views So now that our views are cached, how do I purge them programmatically? Well, you need to talk to the `template` cache provider and use the clearing methods: