optional caching for serving embedded static content

simple patch to enable caching based on dynamic configuration while serving static contents