This seems more expensive than necessary.  If the CSS is static, why not just do it once instead of hitting the disk for each non-cached display?