final IResource resource = reference.getResource();
// is resource supposed to be cached?
if (resource instanceof IStaticCacheableResource)
{
final IStaticCacheableResource cacheable = (IStaticCacheableResource)resource;
// is caching enabled?
if(cacheable.isCachingEnabled())
{
// apply caching scheme to resource url
final ResourceUrl resourceUrl = new ResourceUrl(token, parameters);
getCachingStrategy().decorateUrl(resourceUrl, cacheable);
token = resourceUrl.getFileName();