CodeIgniter Forums
Sharing the CI cache folder - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Sharing the CI cache folder (/thread-23303.html)

Sharing the CI cache folder - El Forum - 10-06-2009

Apologies if this has been asked before. I did a quick forum search and checked the documentation. Basically, I'm using CI with another third-party library that makes use of flat-file caching. To keep things clean, I have the library place its cached files into CI's default cache directory.

I just wanted to make sure that CI only flushes the cache files it creates. This seems like the logical behaviour. As far as I can tell, CI checks for timestamp metadata within its cache files. If it's not present, the cache is ignored.

if ( ! preg_match("/(\d+TS--->)/", $cache, $match))
            return FALSE;

It'd just be nice to get this confirmed.

Sharing the CI cache folder - El Forum - 10-07-2009

[eluser]Damien K.[/eluser]
Presumably, it matches a given pattern in the metadata. If your third-party library uses a similar pattern for their metadata, then no doubt CI will flush those out as well.

1) Identify if the metadata from CI and the third-party library has the same pattern
2) Read the source code for CI (not sure if the code you provided was from CI or not)