improve thumbnail caching

avoid disabling the cache when the access control has no rules in the THUMBNAIL context