[eluser]Tweakin[/eluser]
I'm a big fan of including just one large file for js or css on my sites to save on page load. I usually have several separate files of each (easier to work with) then add them together through the magic of whatever server-side language I am using and outputting them in one compact chunk.
So I'm starting my first major CI project and am just adding this functionality in now. I have a controller (Assets) with two functions (js and css) that compact and combine each respective set of files, then output them with the appropriate Content-type. This works as expected but I usually like to add a cache into the mix to save server load on compacting/combining for each page hit.
I would like to use CI's built in cache functionality for this but am not sure it will work. It seems to return all cache files as type text/html, destroying my text/css or text/javascript set in the actual controller.
Has anyone worked around a similar issue to this? It would be easy enough to make my own cache for this, but I'd rather make use of the already existing cache in CI.