@Dreamer What you can do is, create a cache forever. And reset it when new content is added to the database. That is in the Model's created event just forget the previous cache and recreate it.
The right way to cache dynamic content
Hello
I am unsure how this is best handled by experienced developers. I have a page that has a lot of dynamic content in it. Some content comes from ajax, another is set/created by jquery.
Now, how can i make it so when user clicks reload or clicks on a link and then comes back to a page, the page would still look like it was with all the dynamic content.
I know it is made by Laravels Cache: http://laravel.com/docs/5.2/cache
But, how to best implement it for views with dynamic content. Do i have to make an ajax that saves view to cache every time something changes? Or i have to ajax cache everything separately?
For example, if client is selected, do i have to put 'client' into cache and then check for it in the view and if exists, display it? Or i can just update view cache of the whole page?
Any tips would be appreciated!
Please or to participate in this conversation.