Welcome Guest, Not a member yet? Register   Sign In
Caching and headers
#10

[eluser]beemr[/eluser]
The cache files used by CI contain the final text output from a previous execution of a controller. CI only adds a timestamp to the beginning of that text file but no header info is stored. The name for the text file is the MD5-encrypted URL for the controller. To maximize its efficiency, CI calls for the cache file as early in the request as possible so there are only a few classes loaded and available. Essential to this are the URI and Output classes. CI has to MD5 the URI in order to find the cache file. Then Output regex's out the timestamp to check whether or not the file is expired.

Suffix cache just goes the extra mile and adds headers to the cache file and a suffix to the URI that gets MD5'ed into a the cache file's name. If the suffix wasn't stored as part of the lookup name, you would end up overwriting your controller's cache with the cache of its css or js. That means that Josh needed to extend URI to add the suffix and then extend Output to parse out the headers from the text file.


Messages In This Thread
Caching and headers - by El Forum - 07-10-2008, 11:38 PM
Caching and headers - by El Forum - 07-11-2008, 05:16 AM
Caching and headers - by El Forum - 07-11-2008, 09:07 AM
Caching and headers - by El Forum - 07-11-2008, 11:34 AM
Caching and headers - by El Forum - 07-11-2008, 12:58 PM
Caching and headers - by El Forum - 07-11-2008, 03:08 PM
Caching and headers - by El Forum - 07-11-2008, 10:38 PM
Caching and headers - by El Forum - 07-11-2008, 10:44 PM
Caching and headers - by El Forum - 07-12-2008, 12:17 AM
Caching and headers - by El Forum - 07-12-2008, 12:21 AM
Caching and headers - by El Forum - 07-12-2008, 12:44 PM
Caching and headers - by El Forum - 07-20-2008, 10:00 PM
Caching and headers - by El Forum - 07-20-2008, 10:30 PM
Caching and headers - by El Forum - 07-20-2008, 10:31 PM
Caching and headers - by El Forum - 07-20-2008, 11:52 PM
Caching and headers - by El Forum - 07-20-2008, 11:54 PM
Caching and headers - by El Forum - 07-21-2008, 05:25 AM
Caching and headers - by El Forum - 07-21-2008, 10:07 AM
Caching and headers - by El Forum - 07-21-2008, 11:47 AM
Caching and headers - by El Forum - 07-21-2008, 03:19 PM
Caching and headers - by El Forum - 07-21-2008, 03:58 PM
Caching and headers - by El Forum - 07-21-2008, 04:21 PM
Caching and headers - by El Forum - 07-21-2008, 05:31 PM
Caching and headers - by El Forum - 07-21-2008, 06:46 PM
Caching and headers - by El Forum - 07-21-2008, 07:02 PM
Caching and headers - by El Forum - 07-21-2008, 07:11 PM
Caching and headers - by El Forum - 07-21-2008, 07:29 PM
Caching and headers - by El Forum - 07-21-2008, 07:39 PM
Caching and headers - by El Forum - 07-21-2008, 08:49 PM
Caching and headers - by El Forum - 07-21-2008, 08:55 PM
Caching and headers - by El Forum - 07-21-2008, 10:01 PM
Caching and headers - by El Forum - 07-21-2008, 10:11 PM
Caching and headers - by El Forum - 07-21-2008, 10:15 PM
Caching and headers - by El Forum - 07-21-2008, 10:22 PM
Caching and headers - by El Forum - 07-21-2008, 10:28 PM
Caching and headers - by El Forum - 07-21-2008, 10:36 PM
Caching and headers - by El Forum - 07-21-2008, 10:37 PM
Caching and headers - by El Forum - 07-21-2008, 10:40 PM
Caching and headers - by El Forum - 07-21-2008, 11:26 PM
Caching and headers - by El Forum - 07-22-2008, 10:12 AM
Caching and headers - by El Forum - 07-22-2008, 10:26 AM
Caching and headers - by El Forum - 07-22-2008, 12:21 PM
Caching and headers - by El Forum - 07-22-2008, 01:01 PM
Caching and headers - by El Forum - 07-22-2008, 01:09 PM
Caching and headers - by El Forum - 07-22-2008, 01:14 PM
Caching and headers - by El Forum - 07-22-2008, 01:37 PM
Caching and headers - by El Forum - 07-22-2008, 01:44 PM
Caching and headers - by El Forum - 07-22-2008, 03:39 PM
Caching and headers - by El Forum - 07-22-2008, 03:42 PM
Caching and headers - by El Forum - 07-22-2008, 03:43 PM
Caching and headers - by El Forum - 07-22-2008, 03:49 PM
Caching and headers - by El Forum - 07-22-2008, 04:08 PM
Caching and headers - by El Forum - 07-22-2008, 04:31 PM
Caching and headers - by El Forum - 07-22-2008, 04:45 PM
Caching and headers - by El Forum - 07-22-2008, 04:47 PM
Caching and headers - by El Forum - 07-22-2008, 04:59 PM
Caching and headers - by El Forum - 07-22-2008, 05:49 PM
Caching and headers - by El Forum - 07-22-2008, 06:58 PM
Caching and headers - by El Forum - 07-22-2008, 06:59 PM
Caching and headers - by El Forum - 07-22-2008, 07:30 PM
Caching and headers - by El Forum - 07-22-2008, 08:08 PM
Caching and headers - by El Forum - 07-22-2008, 08:58 PM
Caching and headers - by El Forum - 07-22-2008, 08:59 PM
Caching and headers - by El Forum - 10-27-2008, 03:55 AM
Caching and headers - by El Forum - 10-27-2008, 10:33 AM
Caching and headers - by El Forum - 10-27-2008, 11:55 AM
Caching and headers - by El Forum - 11-11-2008, 03:59 AM
Caching and headers - by El Forum - 11-11-2008, 05:29 AM
Caching and headers - by El Forum - 11-11-2008, 06:08 AM
Caching and headers - by El Forum - 11-11-2008, 01:12 PM
Caching and headers - by El Forum - 11-12-2008, 12:11 AM
Caching and headers - by El Forum - 11-12-2008, 03:25 AM
Caching and headers - by El Forum - 11-12-2008, 04:28 AM
Caching and headers - by El Forum - 11-12-2008, 04:45 AM
Caching and headers - by El Forum - 11-12-2008, 06:48 AM
Caching and headers - by El Forum - 11-12-2008, 07:22 AM
Caching and headers - by El Forum - 11-12-2008, 07:55 AM
Caching and headers - by El Forum - 11-12-2008, 10:44 AM
Caching and headers - by El Forum - 11-13-2008, 03:23 AM
Caching and headers - by El Forum - 11-13-2008, 04:48 AM
Caching and headers - by El Forum - 11-13-2008, 05:17 AM
Caching and headers - by El Forum - 11-13-2008, 05:41 AM
Caching and headers - by El Forum - 11-13-2008, 12:17 PM
Caching and headers - by El Forum - 11-13-2008, 12:27 PM
Caching and headers - by El Forum - 11-13-2008, 12:34 PM
Caching and headers - by El Forum - 11-17-2008, 03:12 AM
Caching and headers - by El Forum - 11-17-2008, 05:01 AM
Caching and headers - by El Forum - 11-17-2008, 07:32 AM
Caching and headers - by El Forum - 11-17-2008, 07:57 AM
Caching and headers - by El Forum - 11-17-2008, 03:26 PM
Caching and headers - by El Forum - 11-17-2008, 03:45 PM
Caching and headers - by El Forum - 11-17-2008, 10:53 PM
Caching and headers - by El Forum - 11-18-2008, 02:47 AM
Caching and headers - by El Forum - 11-18-2008, 03:18 AM
Caching and headers - by El Forum - 06-23-2009, 03:40 AM
Caching and headers - by El Forum - 01-22-2010, 08:22 AM
Caching and headers - by El Forum - 06-04-2012, 10:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB