Welcome Guest, Not a member yet? Register   Sign In
Codeigniter - cache only part of the view
#4

first - my opinion is that you should not be verifying something as important as login state in a view file. that kind of verification should be happening in the controller -- and then you call the correct view and show the appropriate content.

the cache feature is awesome -- when you have concurrent users on the same web page. for many websites you are pulling a bunch of content from a database. by using the cache feature you completely eliminate those database calls. you then set up the time of the cache based on how often the page content changes. even if the content changes every 10 minutes it is still worth using cache, again to speed up the page response time when more then one person is looking at the same page.

i won't pretend to understand how the cache is created, but basically there is one file in the application/cache folder that is read to show the entire web page.
Reply


Messages In This Thread
RE: Codeigniter - cache only part of the view - by cartalot - 12-13-2015, 09:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB