[ https://issues.apache.org/jira/browse/WICKET-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pedro Santos updated WICKET-7128: --------------------------------- Description: Context: currently Wicket uses an IResourceCachingStrategy to control how the app resources will be cached in the browser by decorating the URL, and a CachingResourceStreamLocator to control how the resource is cached in the server. However, in the resource interface, it's not clear that the flag IStaticCacheableResource.isCachingEnabled() is used only to inform how the resource should be cached in the client. Improvement: - to deprecate IStaticCacheableResource.isCachingEnabled() in the current versions and rename it to IStaticCacheableResource.isClientCachingStrategyEnabled() in the next major one, plus to improve its Javadoc. Context: after working on the ticket WICKET-7024, I stumbled on the need for IStaticCacheableResource implementations to be able to know if the work to resolve an IResourceStream should update or not the server resources cache in the CachingResourceStreamLocator. Improvement: - to introduce a new method: IStaticCacheableResource.isServerCachingUpdateEnabled() or to change IStaticCacheableResource.getResourceStream() to IStaticCacheableResource.getResourceStream(boolean updateCache) Context: while decoding the resource attributes (style/locale/variation) from the URL, there is a first step needed before to cause the matching resource to be add in the cache. During this first step (sanitization), there are a few interfaces that need to collaborate by providing the necessary API to avoid the cache update. Improvement: * rename IResourceReferenceFactory.create(key) to IResourceReferenceFactory.create(key, boolean updateCache) * rename ResourceReferenceRegistry. getResourceReference(scope, name, locale, style, variation, strict, createIfNotFound) to ResourceReferenceRegistry. getResourceReference(scope, name, locale, style, variation, strict, createIfNotFound, boolean updateCache) - rename ResourceReferenceRegistry#createDefaultResourceReference(Key) to ResourceReferenceRegistry#createDefaultResourceReference(Key, boolean updateCache) * rename PackageResource#exists(scope, path, locale, style, variation) to PackageResource#exists(scope, path, locale, style, variation, boolean updateCache) was: Context: currently Wicket uses an IResourceCachingStrategy to control how the app resources will be cached in the browser by decorating the URL, and a CachingResourceStreamLocator to control how the resource is cached in the server. However, in the resource interface, it's not clear that the flag IStaticCacheableResource.isCachingEnabled() is used only to inform how the resource should be cached in the client. Improvement: - to deprecate IStaticCacheableResource.isCachingEnabled() in the current versions and rename it to IStaticCacheableResource.isClientCachingStrategyEnabled() in the next major one, plus to improve its Javadoc. Context: after working on the ticket WICKET-7024, I stumbled on the need for IStaticCacheableResource implementations to be able to know if the work to resolve an IResourceStream should update or not the server resources cache in the CachingResourceStreamLocator. Improvement: - to introduce a new method: IStaticCacheableResource.isServerCachingUpdateEnabled() or to change IStaticCacheableResource.getResourceStream() to IStaticCacheableResource.getResourceStream(boolean updateCache) Context: while decoding the resource attributes (style/locale/variation) from the URL, there is a first step needed before to cause the matching resource to be add in the cache. During this first step (sanitization), there are a few interfaces that need to collaborate by providing the necessary API to avoid the cache update. Improvement: * rename IResourceReferenceFactory.create(key) to IResourceReferenceFactory.create(key, boolean updateCache) * rename ResourceReferenceRegistry. getResourceReference(scope, name, locale, style, variation, strict, createIfNotFound) to ResourceReferenceRegistry. getResourceReference(scope, name, locale, style, variation, strict, createIfNotFound, boolean updateCache) - rename ResourceReferenceRegistry#createDefaultResourceReference(Key) to ResourceReferenceRegistry#createDefaultResourceReference(Key, boolean updateCache) * rename PackageResource#exists(scope, path, locale, style, variation) to PackageResource#exists(scope, path, locale, style, variation, boolean updateCache) * > Improvement suggestions to IStaticCacheableResource, PackageResource, > IResourceReferenceFactory, ResourceReferenceRegistry APIs > ------------------------------------------------------------------------------------------------------------------------------- > > Key: WICKET-7128 > URL: https://issues.apache.org/jira/browse/WICKET-7128 > Project: Wicket > Issue Type: Sub-task > Components: wicket-core > Affects Versions: 10.3.0 > Reporter: Pedro Santos > Assignee: Pedro Santos > Priority: Minor > > Context: currently Wicket uses an IResourceCachingStrategy to control how the > app resources will be cached in the browser by decorating the URL, and a > CachingResourceStreamLocator to control how the resource is cached in the > server. However, in the resource interface, it's not clear that the flag > IStaticCacheableResource.isCachingEnabled() is used only to inform how the > resource should be cached in the client. > Improvement: > - to deprecate IStaticCacheableResource.isCachingEnabled() in the current > versions and rename it to > IStaticCacheableResource.isClientCachingStrategyEnabled() in the next major > one, plus to improve its Javadoc. > Context: after working on the ticket WICKET-7024, I stumbled on the need for > IStaticCacheableResource implementations to be able to know if the work to > resolve an IResourceStream should update or not the server resources cache in > the CachingResourceStreamLocator. > Improvement: > - to introduce a new method: > IStaticCacheableResource.isServerCachingUpdateEnabled() or to change > IStaticCacheableResource.getResourceStream() to > IStaticCacheableResource.getResourceStream(boolean updateCache) > Context: while decoding the resource attributes (style/locale/variation) from > the URL, there is a first step needed before to cause the matching resource > to be add in the cache. During this first step (sanitization), there are a > few interfaces that need to collaborate by providing the necessary API to > avoid the cache update. > Improvement: > * rename IResourceReferenceFactory.create(key) to > IResourceReferenceFactory.create(key, boolean updateCache) > * rename ResourceReferenceRegistry. getResourceReference(scope, name, > locale, style, variation, strict, createIfNotFound) to > ResourceReferenceRegistry. getResourceReference(scope, name, locale, style, > variation, strict, createIfNotFound, boolean updateCache) > - rename ResourceReferenceRegistry#createDefaultResourceReference(Key) to > ResourceReferenceRegistry#createDefaultResourceReference(Key, boolean > updateCache) > * rename PackageResource#exists(scope, path, locale, style, variation) to > PackageResource#exists(scope, path, locale, style, variation, boolean > updateCache) -- This message was sent by Atlassian Jira (v8.20.10#820010)