// TODO is calling getResource() a potential performance bottleneck?
final IResource resource = resourceReference.getResource();
if (resource instanceof IStaticCacheableResource)
{
final IStaticCacheableResource cacheable = (IStaticCacheableResource)resource;
final ResourceUrl cacheUrl = new ResourceUrl(filename, parameters);
getCachingStrategy().decorateUrl(cacheUrl, cacheable);
if (Strings.isEmpty(cacheUrl.getFileName()))