CacheBox and cached event/view with JSMin

I'm using the JSMin plugin to inject js/css assets through views. I'm
also using event/handler/view caching.

When an event has a view that uses the JSMin plugin, nothing gets sent
to the head.

For instance, let's say I have a "view cart" view - I might want to
inject some javascript and some CSS for the "cart" page using the
JSMin plugin from inside my view (my layout is far too generic).

But after the first request, the "cached" request looks horrendous as
none of my css assets are being included. I'm presuming this has
something to do with coldbox caching the layout before the jsmin
plugin does its thing and includes my assets in the head.

Anyone got any ideas around this? As at present I'm having to turn
event caching off and I don't really want to do that!

Thanks,

Tom.

Tom,

Thanks for the feedback. I don’t have a solution, but, I’ll start thinking about it. I wanted to reply so you know this thread is important and has not been skipped.

Aaron Greenlee
http://aarongreenlee.com/

Tom, did you resolve this?

Well sort of(!)

I just don’t do minifyToHead(). I instead do minify() - i.e inline and tags which works fine.

There is the occasional jQuery plugin that simply won’t work unless they’re in the head - I have to put these into my layout instead after a few hours of head-scratching!

Tom.