OSCache - Complete Change Log

## OSCache 2.4.1 ### Release Notes (7th July 2007 - by Lars Torunski) #### This maintenance release of 2.4.1 has two bug fixes: The cacheFlushed method is not being invoked on the CacheEntryEventListener CacheFilter max-age parameter MAX_AGE_NO_INIT not set properly #### JIRA Issue List
OpenSymphony JIRA (3 issues)
T | Key | Summary | Status
--- | --- | --- | ---
| CACHE-297 | max-age parameter not set on ResponseContent object returned from cache when using MAX_AGE_NO_INIT | Closed
| CACHE-296 | For a Cache class the cacheFlushed method is not being invoked on the CacheEntryEventListener. | Closed
| CACHE-279 | LRUCache loses entries when updated by mutliple threads. | Closed
## OSCache 2.4 ### Release Notes (1st Mai 2007 - by Lars Torunski) #### New features and enhancements Furthermore the next major release 2.4 enhances the CacheFilter and allows a better integration with the Spring Framework and JMX Monitoring. Setting CacheFilter parameters runtime Lazy initialization in CacheFilter in order to ease spring integration Allow disabling cacheing for special http methods (e.g. POST/DELETE/PUT) in CacheFilter CacheFilter allow reentrance over different filter configurations Hibernate 3.2 integration support JMX Monitoring/Administration via Spring Improve oscache.properties loading Performance improvment for large disk persistence usage #### Upgrade Guide Due to the enhancements in the CacheFilter and method signature changes, it's recommended to recompile your code. Due to changes for CACHE-284 the handling of the listeners have been changed: Before OSCache 2.4 objects which implemented different CacheEventListener (e.g. CacheEntryEventListener and CacheMapAccessEventListener) had to be added twice, because the listeners where registrated only for one special event listener. With OSCache 2.4 only the object has to be added to the list without the 2nd parameter 'type of the listener'. #### JIRA Issue List
OpenSymphony JIRA (29 issues)
T | Key | Summary | Status
--- | --- | --- | ---
| CACHE-260 | NullPointerException in AbstractConcurrentReadCache | Closed
| CACHE-295 | Hibernate 3.2 integration support | Closed
| CACHE-215 | Setting CacheFilter parameters runtime | Closed
| CACHE-99 | Use lazy initialization in cache filter in order to ease spring integration | Closed
| CACHE-258 | NullPointerException when using putCache(key, val) in LRUCache | Closed
| CACHE-273 | Update to Commons Logging 1.1 | Closed
| CACHE-253 | Migrate from CVS to SVN | Closed
| CACHE-261 | Check javadoc of Cache.cancelUpdate on key not being updated | Closed
| CACHE-163 | CacheFilter easier sub-classing via pre- and post-processes | Closed
| CACHE-162 | CacheFilter easier sub-classing via useCache | Closed
| CACHE-272 | Allow disabling of cacheing special http methods (e.g. POST/DELETE/PUT) in CacheFilter | Closed
| CACHE-277 | CacheFilter should allow reentrance over different filter configurations | Closed
| CACHE-283 | Improve oscache.properties loading | Closed
| CACHE-266 | ServletCacheAdministrator no longer a "Servlet Singleton" | Closed
| CACHE-267 | SplitServletOutputStream doesn't pass flush() on to underlying stream | Closed
| CACHE-141 | CacheFilter easier sub-classing | Closed
| CACHE-288 | Error in the HashDiskPersistenceListener byteArrayToHexString | Closed
| CACHE-264 | problem with not escaped group names and their filenames for disk persistence | Closed
| CACHE-255 | AbstractConcurrentReadCache#put(Object key, Object value) may return a wrong value | Closed
| CACHE-249 | Performance improvment for large disk persistence usage | Closed
| CACHE-293 | Allow to specify a different oscache.properties file for Hibernate | Closed
| CACHE-278 | Filter ignores max-age parameter when serving from cache | Closed
| CACHE-284 | Cache.dispatchCacheEntryEvent and Cache.addEventListener implementations are inconsistent | Closed
| CACHE-274 | new method getIntialContext JMSBroadcastingListener | Closed
| CACHE-263 | Run FindBugs 1.1.3 against current source code | Closed
| CACHE-292 | CacheFilter max-age default and error-case initialisation are wrong | Closed
| CACHE-290 | Bad Practice | Closed
| CACHE-178 | JMX Monitoring/Administration via Spring | Closed
| CACHE-252 | Log warning if user tries to set max entries on an unlimited cache | Closed
## OSCache 2.3.2 ### Release Notes (23rd July 2006 - by Lars Torunski) #### This maintenance release of 2.3.1 has one enhancement: The removeEntry method in the Cache removes the entry from its groups now #### Bug fixes: Method addGroupMappings leads to inconsistent memory cache if a persistent cache group exists Cache group is updated if entry is removed (duplicate) #### JIRA Issue List
OpenSymphony JIRA (3 issues)
T | Key | Summary | Status
--- | --- | --- | ---
| CACHE-244 | Cache group is not updated if entry is removed | Closed
| CACHE-188 | removeEntry should update group mappings | Closed
| CACHE-181 | addGroupMappings leads to inconsistent Memory-Cache | Closed
## OSCache 2.3.1 ### Release Notes (19th June 2006 - by Lars Torunski) #### This maintenance release of 2.3 has one enhancement: CacheFilter: Default initialization of the Cache-Control max-age #### Bug fixes: Cache.flushAll(Date flushDate) won't throw NeedsRefreshException when flush date is not yet reached anymore No NoSuchElementException at Cache.putInCache() anymore #### JIRA Issue List
OpenSymphony JIRA (3 issues)
T | Key | Summary | Status
--- | --- | --- | ---
| CACHE-246 | java.util.NoSuchElementException during at com.opensymphony.oscache.base.Cache.putInCache() | Closed
| CACHE-241 | Cache.flushAll(Date flushDate) throws NeedsRefreshException when flush date is not yet reached | Closed
| CACHE-240 | Default initialization of the Cache-Control max-age | Closed
## OSCache 2.3 ### Release Notes (6th March 2006 - by Lars Torunski) #### This release includes additional improvements to the CacheFilter: CRON expressions to expire content at specific dates and/or times Pluggable EntryRefreshPolicy Reduced memory consumption #### Disk persistence: Faster disk persistence Avoid DiskPersistenceListener deadlocks if process has no rights to delete cache file #### Further changes are: new JSP tag addgroups interface to get a list of the cache event listeners commons collection dependency removed Java 1.3 support dropped #### JIRA Issue List
OpenSymphony JIRA (14 issues)
T | Key | Summary | Status
--- | --- | --- | ---
| CACHE-235 | Pluggable EntryRefreshPolicy for CacheFilter | Closed
| CACHE-230 | CacheFilter Tutorial | Closed
| CACHE-229 | Tomcat 5.5.12 throws IllegalStateException on getId() / fixed Servlet Spec 2.4 | Closed
| CACHE-228 | Add CRON expressions to CacheFilter to expire content at specific dates and/or times. | Closed
| CACHE-227 | Remove commons collections from distribution | Closed
| CACHE-226 | Drop Java 1.3 support | Closed
| CACHE-222 | Add new JSP tag addGroups | Closed
| CACHE-217 | Avoid DiskPersistenceListener deadlocks if process has no rights to delete cache file | Closed
| CACHE-216 | Review CacheFilter against Servlet 2.4 spec. | Closed
| CACHE-214 | Reduce memory consumption of ResponseContent | Closed
| CACHE-200 | add 'getCacheEventListenerList()' to Cache class | Closed
| CACHE-197 | Speed up disk persistence | Closed
| CACHE-183 | HashDiskPersistenceListener / MessageDigest not thread safe | Closed
| CACHE-136 | SequencedHashMap is deprecated in commons collections 3.1 | Closed
## OSCache 2.2 Final ### Release Notes - Final (6th November 2005 - by Lars Torunski) #### Additionally to the 2.2 RC improvements, the final release was enhanced by: Allow cache group definition in CacheFilter Option to specify when to send Expires-Header Allow disabling initial set of the last modified header Continuous Integration and Dependency Management with Ivy Update to JGroups 2.2.8 #### JIRA Issue List
OpenSymphony JIRA (12 issues)
T | Key | Summary | Status
--- | --- | --- | ---
| CACHE-223 | completeUpdate never being called after startUpdate() has been called, OSCache hangs for that key | Closed
| CACHE-211 | Create check sums for the distribution files | Closed
| CACHE-210 | Review: If last test-base and last test-web overwrite previous unit test reports | Closed
| CACHE-204 | Allow disabling initial set of the last modified header | Closed
| CACHE-203 | Change JSP tag URI in pages of example war | Closed
| CACHE-202 | Expires header should not be inital set in fragments | Closed
| CACHE-201 | Defined interface for ICacheKeyProvider not used in CacheFilter | Closed
| CACHE-199 | Continuous Integration and Dependency Management with Ivy | Closed
| CACHE-198 | Update to JGroups 2.2.8 | Closed
| CACHE-196 | Option to specify when to send Expires-Header | Closed
| CACHE-195 | Allow cache group generation in CacheFilter | Closed
| CACHE-194 | Update Documentation | Closed
## OSCache 2.2 RC ### Release Notes - Release Candidate (18th September 2005 - by Lars Torunski) #### Besides bugs being fixed, major improvements have been made to the CacheFilter in many ways: Default initialization of the last modified header which reduces transaction overhead and server load Support of GZip filters in the filter chain Custom key generation by subclassing CacheFilter or by implementing a special interface Preserving more http headers, e.g. the expires header Special handling for fragments of a page Avoids session creation for application scope pages Multiple matching cache filters won't dead-lock the response anymore #### JIRA Issue List
OpenSymphony JIRA (22 issues)
T | Key | Summary | Status
--- | --- | --- | ---
| CACHE-189 | AbstractDiskPersistenceListener.store hangs on exception | Closed
| CACHE-185 | Filtered requests will be re-requested twice | Closed
| CACHE-184 | Filter deadlock with external apps (mostly spiders) | Closed
| CACHE-179 | Provider interface for method createCacheKey | Closed
| CACHE-174 | Regression in fix of CACHE-170: UpdateStateEntry may leak when entry are removed | Closed
| CACHE-173 | NullPointerException while flushing inexistant group | Closed
| CACHE-170 | Data race handling Cache.updateStates results in Thread hangs when the blocking mode is used in concurrence | Closed
| CACHE-169 | Default initialization of the last modified header | Closed
| CACHE-161 | CacheFilter easier sub-classing via isCacheable | Closed
| CACHE-160 | ExpiresRefreshPolicy always set in CacheFilter | Closed
| CACHE-155 | Support of GZip filters in the filter chain | Closed
| CACHE-154 | NullPointerException in JavaGroupsBroadcastingListener | Closed
| CACHE-148 | getInstance call not thread-safe | Closed
| CACHE-144 | CacheTag doesn't clear variables in doStartTag / doFinally | Closed
| CACHE-143 | Report expected expiry to clients/browsers/proxy | Closed
| CACHE-138 | Document new parameters in the wiki | Closed
| CACHE-135 | CacheFilter for fragements of a page | Closed
| CACHE-129 | CacheFilter will create useless sessions for application-scope pages | Closed
| CACHE-128 | Multiple matching filters will dead-lock the response | Closed
| CACHE-120 | New nocache option when body contains a jsessionid | Closed
| CACHE-83 | CacheHttpServletResponseWrapper & ResponseContent dont preserver Http headers | Closed
| CACHE-69 | Custom Key Generation on CacheFilter | Closed
## OSCache 2.1.1 ### Release Notes (1st May 2005 - by Andres March) #### Improvements: The taglib URI was changed to `http://www.opensymphony.com/oscache` in CACHE-61 The DiskPersistenceListener escapes '?' now and guarantees that the filenames will be unique based on the cache key, see CACHE-110 Session objects in cache tags are created only if necessary, see CACHE-88 The disk persistence configuration key can be accessed now, see CACHE-111 #### Bug Fixes: The CacheFilter doesn't send back a 304 (not modified) response when client cache is de-activated anymore, see CACHE-116 CacheFilter doesn't support correctly i18N by setting encoding not properly, CACHE-38 and CACHE-159 Cron expressions - leap days not always matched correctly, CACHE-157 FindBugs doesn't report that the usage of GetResource may be unsafe if class Config is extended anymore, see CACHE-108 ConcurrentModificationException on flushGroup, see CACHE-127 Exception not thrown when not serializable object is persisted instead stack trace is persisted, see CACHE-112 A few concurrency issues were fixed, see CACHE-170, CACHE-167, CACHE-127 #### Changes that may affect backwards compatibility: The improvement CACHE-88 may change the behaviour of the application, because a session object isn't created anymore even if it wasn't necessary. A web application may react different to a not existing session object. The URI change of CACHE-61 from `/oscache` to `http://www.opensymphony.com/oscache` affects all JSP's which explicit use the old URI. #### JIRA Issue List
OpenSymphony JIRA (15 issues)
T | Key | Summary | Status
--- | --- | --- | ---
| CACHE-170 | Data race handling Cache.updateStates results in Thread hangs when the blocking mode is used in concurrence | Closed
| CACHE-167 | removeEntry not synchronized | Closed
| CACHE-159 | CacheFilter does not set encoding properly | Closed
| CACHE-157 | Cron expressions - leap days not always matched correctly | Closed
| CACHE-131 | JavaDoc: Missing class description - CacheContextListener | Closed
| CACHE-127 | ConcurrentModificationException on flushGroup | Closed
| CACHE-116 | CacheFilter sends back a 304 (not modified) response when client cache is de-activated | Closed
| CACHE-112 | Exception not thrown when not serializable object is persisted instead stack trace is persisted! | Closed
| CACHE-111 | public access for disk persistence configuration key | Closed
| CACHE-110 | DiskPersistenceListener should escape '?' | Closed
| CACHE-109 | cache.blocking parameter missing in oscache.properties | Closed
| CACHE-108 | FindBugs reports: Usage of GetResource may be unsafe if class Config is extended | Closed
| CACHE-88 | Don't create session object in cache tags unless necessary | Closed
| CACHE-61 | Taglib URI Attribute | Closed
| CACHE-38 | oscache filter doesn't support correctly i18N | Closed
## OSCache 2.1 ### Release Notes (18th January 2005 - by Andres March) #### New Features: Added HashDiskPersistenceListner CACHE-132 that hashes file names in order to eliminate nasty characters and overly long names Added property that allows cache entries to only be persisted when the memory capacity has been exceeded. The property is called: cache.persistence.overflow.only. It defaults to false for backwards compatibility meaning all cache entries are persisted when a listener has been registered. See CACHE-133 Check If-Modified-Since header in cache filter to increase performance, see CACHE-58 and CACHE-70 #### Improvements: Updated jgroups jar regarding changed package name CACHE-85 , CACHE-126 and configuration based upon recommendations from Bela Ban (javagroups maintainer). More evenly distributed disk caching, see CACHE-94 Public access for configuration properties, see CACHE-92 Public method to clear cache, see CACHE-104 , CACHE-68 Output the scope name's in toString() of ScopeEventListenerImpl, see CACHE-95 Call get() method on put() method call, see CACHE-105 Library updates upgrade to Commons Logging 1.0.4, see CACHE-102 upgrade to Commons Collections 3.1, see CACHE-103 Moved all docs to wiki Website documentation updates. #### Bug Fixes: CACHE-73 - NullpointerException after deserialization of AbstractConcurrentReadCache CACHE-98 - Disk cache not getting served first time for long keys CACHE-107 - flushEntry does not behave correctly in cluster CACHE-118 - Updating groups doesn't work CACHE-119 - flush does not work correctly in a clustered environment
OpenSymphony JIRA (21 issues)
T | Key | Summary
--- | --- | ---
| CACHE-133 | added cache.persistence.overflow.only property
| CACHE-132 | Added HashDiskPersistenceListner
| CACHE-126 | java.lang.NoClassDefFoundError: org/javagroups/blocks/NotificationBus$Consumer
| CACHE-119 | flush does not work correctly in a clustered environment
| CACHE-118 | Updating groups doesn't work
| CACHE-107 | flushEntry does not behave correctly in cluster
| CACHE-105 | call get() method on put() method call
| CACHE-104 | Destroy cache
| CACHE-103 | upgrade to Commons Collections 3.1
| CACHE-102 | upgrade to Commons Logging 1.0.4
| CACHE-98 | Disk cache not getting served first time for long keys
| CACHE-95 | Output the scope name's in toString()
| CACHE-94 | More evenly distributed disk caching
| CACHE-92 | public access for configuration properties
| CACHE-89 | java.lang.NullPointerException : AbstractCacheAdministrator.finalizeListeners
| CACHE-85 | upgrade to JavaGroups 2.2.7
| CACHE-73 | NullpointerException after deserialization of AbstractConcurrentReadCache
| CACHE-72 | NullPointerException in AbstractConcurrentReadCache.clear
| CACHE-71 | Flush and refresh of cached pages fail under heavy load
| CACHE-70 | last modified problem
| CACHE-58 | Check If-Modified-Since header in cache filter
## OSCache 2.0.2 ### Release Notes (22nd January 2004 - by Mathias Bogaert) #### Improvements: Website documentation updates. Added OSCache in the Wild. #### Bug Fixes: CACHE-63 NullPointerException in GeneralCacheAdministrator#destroy(). CACHE-44 Multi threading issues with LRU Cache. CACHE-66 DiskPersistenceListener is not Serializable. GeneralCacheAdministrator now creates the cache from within the constructor. This prevents possible threading issues if the cache is not initialized during application startup. ## OSCache 2.0.1 ### Release Notes (4th November 2003 - by Chris Miller) #### Improvements: CACHE-56 Refresh period is no longer mandatory. CACHE-51 Added an <cache:addgroup /> tag. This allows cache groups to be dynamically added from within a <cache:cache /> tag. Website documentation is now bundled with the OSCache distribution. #### Bug Fixes: CACHE-59 Silent mode could not be reset. CACHE-60 Fixed deadlock problem when cancelUpdate() was called while under load. #### Changes that may affect backwards compatibility: StringUtil.split() now returns a List rather than a String[]. ## OSCache 2.0 ### Release Notes (22nd September 2003 - by Chris Miller) #### Improvements: Minor FastCronParser speedup. Made ClusterNotification constants public. Dropped some of the logging levels from INFO down to DEBUG. Release has been split into two - a binary release and a full release (includes source). #### Bug Fixes: CACHE-52 Fixed a problem that caused no output on Tomcat for small JSP files. CACHE-53 Updated documentation to explain that a PersistenceListener must be specified to enable caching to disk. CACHE-55 JMS was throwing an exception on Weblogic. Altering the cache capacity on the fly using the administrator classes wasn't working correctly. ## OSCache 2.0 beta 2 ### Release Notes (4th August 2003 - by Chris Miller) #### New Features: Now supports JavaGroups version 2.1. JMS Clustering support has been added -Romulus Pasca. Clustering code has been refactored. As a result of this, some of the clustering configuration has changed since beta 1 - please see the updated clustering documentation for details. Performance enhancement: When running under JRE 1.3.x, the LRUCache will now attempt to use the Jakarta commons collections SequencedHashMap. If the commons-collections.jar is not present then the code resorts to using a LinkedList and a warning is logged. Note that under JRE 1.4.x and higher the commons-collections.jar is not required. Config.getProperties() method added. #### Bug Fixes: CACHE-48 FastCronParser no longer requires JDK 1.4.x. CACHE-45 Fixed a serialization bug. The CachewideEvent was not holding the event date. Prevented an error from being logged in the CachewideEvent handling (even though no problem had occurred). Fixed a subtle bug in the concurrent unit test. The ServletCacheAdministrator's app scope cache is created on startup (via the CacheContextListener). ## OSCache 2.0 beta 1 ### Release Notes (19th July 2003 - by Chris Miller) #### New Features: CACHE-11 Cache grouping support. This allows cache entries to be placed into an arbitrary group or groups and flushed with a single flushGroup() call. CACHE-30 Added support for expiring cache entries based on a cron expression. Entries that are older than the date/time that most recently matches the cron expression will be considered stale. This is exposed to the cache tag via the 'cron' attribute. See cronTest.jsp for examples. Event listener support has been refactored and improved. It is now possible to specify a comma-delimited list of event listeners using this property. Previously only one class could be specified. Events listed here should implement the CacheEntryEventListener and/or the ScopeEventListener interfaces. New event CacheMapAccessEvent.STALE_HIT. This event is fired when an attempt is made to retrieve and entry from the cache, and the entry is found but is stale. Clustering support has been added as an event listener. Currently it is implemented using JavaGroups . To enable, just add the BroadcastingCacheEventListener class to the cache.event.listeners property. Now uses Jakarta Commons Logging for all log messages. This means that the cache.debug configuration property is now ignored - use whatever logging configuration is appropriate for your logging setup instead. -Fabian Crabus CACHE-14, Matthias Nott Now allows for content to be cached indefinitely without expiration. The build.xml <javac ...> directives now specify debug="true". Performance boost: When OSCache is running on JRE 1.4 or higher, LRUCache and FIFOCache use a LinkedHashSet instead of a LinkedList. Japloy is now used to ensure source is consistently formatted. Test cases now work on non-windows platforms. Also coverage reports added courtesy of clover. #### Changes that may affect backwards compatibility: The cache.entryevent.classes property in the configuration file has been renamed to cache.event.listeners, since it accepts CacheEntryEventListener, ScopeEventListener and CacheMapAccessEventListener types. The cache.persistence.classes property has been renamed to cache.persistence.class since it is only possible to specify one PersistenceListener. For consistency, cache.unlimited_disk is now cache.unlimited.disk and cache.useHostDomainInKey is now cache.use.host.domain.in.key. The oscache.tld file now uses a taglib 1.2 DTD. To build OSCache, JDK 1.4.x or higher is required. There is however no runtime dependency on JDK 1.4.x. The Cache.flushPattern() method and <cache:flush pattern="..."/> are deprecated. You are instead encouraged to group your cache entries when you add them to the cache and then use the Cache.flushGroup() method or the <cache:flush group="..."/> tag to flush an entire cache group. Disk persistence now puts all files in the same directory. This has a number of side effects. Keys >255 chars will cause problems. Also, similar keys might get mapped to the same file. For example, it is very inadvisable to have two keys with the names 'my_key' and 'my.key'. GeneralCacheAdministrator is no longer static. Users that relied on this behaviour can still hold onto a static reference to it with minor code changes. When a NeedsRefreshException is thrown, it is now vital that the cache entry is either updated, or Cache.cancelUpdate(key) is called to release the lock on this cache entry. This is a consequence of the fix for CACHE-42 . CacheProperties class was removed. It didn't work on 1.7.5 anyway. The same effect can be achieved by specifying a subclass of Properties. Autogenerated cache keys now contain the request method (eg, HEAD, GET, etc). OSCache has been repackaged from "com.opensymphony.module.oscache.*" to "com.opensymphony.oscache.*". Any code or configuration files that refer to "com.opensymphony.module.oscache" will need to be updated. #### Bug Fixes: CACHE-4 WebSphere 3.5.x compatibility. CACHE-5 Added a mode attribute to the cache tag to allow content to be cached but not sent to the output stream. See oscacheTest.jsp for an example. CACHE-7 "cache" Tag has no "setEncoding" method. CACHE-9 It could be useful being able to specify directories relative to the web application dir. for config file and cache dir. Use new properties aware getInstance method. CACHE-10 Cannot write and use custom class implementing CacheProperties. CACHE-13 AbstractConcurrentReadCache loops indefinitely when persistRetrieve() returns null. CACHE-14 You can now specify an unlimited refresh time by supplying a negative value for the duration. CACHE-17 An example war is now included - "ant example-war". Once deployed this can be tested using "ant test-web". CACHE-26 Security hole whereby certain keys can overwrite any file. CACHE-28 URLs can now be used as keys with disk persistence. CACHE-31 and CACHE-33 The cache tag's refresh attribute will now be taken into account even if a custom refresh policy has been specified. CACHE-34 Setting properties with AbstractCacheAdministrators. New getInstance method added to ServletCacheAdministrator that takes in properties. CACHE-35 CacheFilter needs to distinguish between HEAD and GET requests. CACHE-39 and CACHE-44 Synchronization with LRUCache fixed. CACHE-42 Threads will no longer race to (re)build expired or new cache entries. By default stale content will be served if available. This behaviour can be changed by setting oscache.blocking=true, which will instead cause threads to block until the new cache entry is available. CACHE-43 Taglibs have been made spec-compliant. They now follow the guidelines at http://jakarta.apache.org/taglibs/guidelines.html. Some synchronization issues were fixed in LRUCache.getItem() and AbstractConcurrentReadCache.setMaxEntries(). ScopeEventListener classes were previously not able to be specified in the configuration even though the dispatching code was implemented. ScopeEventListeners can now be specified using the cache.event.listeners configuration property. CacheMapAccessEvents now only fire when an attempt is made to retrieve the actual cache content for external use. Previously these events were being fired in circumstances that were not of statistical interest - for example HIT and MISS events were being fired when updating or flushing entries from the cache. Minor bug in oscacheTestMultipleTagNoKey.jsp - some of the tag refresh times weren't correctly specified. cachetest.jsp - the 'refresh' functionality wasn't working because the addition of the refresh parameter caused the cache key to be different. The key is now specified explicitly. EntryRefreshPolicy is now serializable so it can be persisted to the disk cache. ServletCacheAdministrator now sorts request parameters and filters out jsessionid so they have no impact on the generated cache key. CacheFilter only caches successful responses (status code == SC_OK). #### Known Problems: (these have existed for some time in the 1.x.x versions and will be addressed in an upcoming 2.x.x release) Session caches (created using the ServletCacheAdministrator) have some known limitations: o Due to a workaround in the code, it is possible for a system under heavy load to get its persistent session caches confused across sessions. o Session caches will not work in a clustered environment. o Session caches have the same settings global settings applied to them as the application scope cache. This means that if you want a persistent cache for the application scope cache, the session caches will use it too. ## OSCache 1.7.5 ### Release Notes (5th January 2002 - by Mike Cannon-Brookes, mike@atlassian.com) Fixed up logging system slightly. All errors should now be logged with logError() and normal messages with log() Fixed bug in build file which put oscache.properties inside the oscache.jar (resulting in it being loaded badly in some containers) Changed cache.capacity in the default oscache.properties file to 1000. This means up to 1000 items will be cached in the default setup, and LRUCache will be used (100 seemed too small) ## OSCache 1.7.4 ### Release Notes (3rd December 2001 - by Francois Beauregard, fbeauregard@pyxis-tech.com, and Mike Cannon-Brookes, mike@atlassian.com) Made all servlet cache components serializable (fixes bug reported on list with JRun) ## OSCache 1.7.3 ### Release Notes (11th November 2001 - by Francois Beauregard, fbeauregard@pyxis-tech.com) TestCacheEntry had a test method with improper name (flush -> testFlush) Pluggable entry refresh policy now available in the cache tag ## OSCache 1.7.2 ### Release Notes (31st October 2001 - by Mike Cannon-Brookes, mike@atlassian.com) Cleaned up all JavaDoc messages to ensure consistency and readability (removed unnecessary CVS tags, added <code> and <pre> where needed, added @return and @param to all methods) Renamed nbMaxEntries to cacheCapacity and cache.size property to cache.capacity (to fit better with Collections API where capacity is max size, size is current size) Renamed algoClass to algorithmClass for clarity. Fixed up build.xml so that test classes are compiled to a different location and not included in oscache.jar (to make it smaller footprint) ## OSCache 1.7.1 ### Release Notes (26th September 2001 - by Francois Beauregard, fbeauregard@pyxis-tech.com, and Alain Bergevin, abergevin@pyxis-tech.com, of Pyxis Technologies Inc.) Cache Events Persistence mechanism refactored Cache Algorithms FIFO + LRU (Limit the size of the cache) AbstractConcurrentReadCache from Doug Lea's ConcurrentReaderHashMap. Should give oscache performance improvement Disk Persistence does not need any locking strategies. Everything is handled by AbstractConcurrentReadCache Pluggable entry refresh policies Unlimited cache size for disk Specify Duration using Simple Date Format or ISO-8601 as suggested by Fredrik Lindgren) The next one that would make sense I think is being able to specify a specific time of day. ## OSCache 1.7.0 ### Release Notes (26th September 2001 - by Francois Beauregard, fbeauregard@pyxis-tech.com, and Alain Bergevin, abergevin@pyxis-tech.com, of Pyxis Technologies Inc.) This version include some refactoring, corrections and new features. Here are the highlights: CacheAdministrator has been split in 3. We have now AbstractCacheAdministrator, and ServletCacheAdministrator and GeneralCacheAdministrator extends it Packages have been adjusted. We now have oscache.base, oscache.general and oscache.Servlet. Adjustement must be made to the oscache.tld ServletCacheHashMap has been created in order to reflect specific needs for Servlets. It extends CacheHashMap Support for multiple cache tag in a single page, without supplying a key. Nested cache tag are not yet supported (you need to manage keys in that case). OSCache can now cache any objects (not only JSP content) using GeneralCacheAdministrator GenerateKey now support suffixes (used to deal with multiple cache tags) A complete JUnit test suite has been created for osCache, including a JSP and a Servlet Added the required libraries for the test unit. The JUnit JAR has been upgraded to version 3.7 Required libraries are now HHTPUnit, Tidy, JUnit 3.7 and JUnitPerf The cBuffer variable used for keyGeneration has been moved locally to GenerateKey since it was a threading issue The build file has been modified to include test running The flushAll method is now abstract since CacheAbstractAdministrator can't know all valid scopes Removed the retry logic for disk cache read and write (not used anymore) Fixed an issue with the needsRefresh method which returned an invalid value when invoked first by returning true and then invoked having to return false. Both case returned true. The doStartTag method in CacheTag has been modified to prevent returning null when cache content is missing (cache file deleted) The doAfterBody method in CacheTag has been modified in order to prevent hitting the cache twice in some situation The useBody method in CacheTag has been renamed to setUseBody in order to reflect its usage LoadProperties interface added to CacheProperties Added a NeedsRefreshException Retrofited the changed made by Kesav Kumar in order to retrieve the sessionId correctly Added code toughness to avoid working with invalid parameters in public methods Magic numbers and strings are now declared as constants Many methods are now declared as final or protected Imports are now more accurate, no more * Comments and some headers modified to reflect JavaDoc standard ## OSCache 1.6.1 ### Release Notes (16th September, 2001 - by Todd Gochenour, tgochenour@peregrine.com) Removed attribute "encoding" in all areas, since Object serialization stores strings in UTF-8 format, encoding is no longer necessary. Added Synchronization to getCacheEntry() to insure multiple threads do not access HashMap and get erroneous results. Implemented property cache.useHostDomainInKey (true/false) to prepend URL request server name to cache key when cache used by multiple servers. The "cache.domainname" property found in oscache.properties (not used in code) was removed. Corrected file caching logic so that multiple processes can share cache information (file locking). Missing still is the ability to signal processes that a cache needs to be flushed when using Memory Caching along with File Caching. Unit testing revealed some minor configuration bugs which were corrected. ## OSCache 1.6 ### Release Notes (5th September, 2001 - by Mike Cannon-Brookes, mike@atlassian.com) Changed the CacheEntry so that it caches Object rather than String (allowing image caching) (Serge Knystautas, sergek@lokitech.com) Cached objects are now serialized to disk so cannot be read by humans anymore (this allows us to cache Object) (Serge Knystautas, sergek@lokitech.com) Added a Servlet 2.3 CacheFilter (and associated response classes) that caches whole requests (Serge Knystautas, sergek@lokitech.com) Minor changes to CacheAdministrator (the way Cache and CacheEntry's are retrieved) - merging Serge and Todd's changes ## OSCache 1.5 ### Release Notes (6th August, 2001 - by Todd Gochenour, tgochenour@peregrine.com) Added boolean "cache.memory" attribute to oscache.properties to eliminate memory consumption and rely strictly on disk storage. Added three interfaces "CacheLog", "CacheProperties", and "CacheContents" to allow plugable implementations for these functions. The CacheContents interface allows the pages to be cached using a database. Added "Language" attribute to CacheTag and FlushTag to distinguish a page that supports I18N generation. The ISO-639 language code is used when the scope of the page is "Application". The code defines a subdirectory under the "application" directory of file caching. Modified the CacheAdministrator.generateKey() function to append the request's QueryString to the URI when automatically generating keys. The QueryString is encoded using the MD5 digest base64 algorithms. Added attribute "encoding" to a CacheTag so that the file IO does proper conversion when reading and writing the cache files. (per suggestion of Pedro Gomez) Added retries when SecurityException is thrown. Java has no built in exclusive file locking implementations. The file is written to a lock file and then renamed as an atomic operation so that multiple processes on the same box can reliable access cache data. Added "pattern" attribute to FlushTag which invokes a CacheHashMap.flushPattern() function to scan for and flush all keys that contain the value of the pattern. (per suggestion of Todd Rudrick) Added support for a CacheTag time value of zero which turns off caching for that tag. (per suggestion of Pedro Gomez) ## OSCache 1.3 ### Release Notes (9th June, 2001 - by Mike Cannon-Brookes, mike@atlassian.com) Fixed a single bug in the file caching - should now work Added property to set the cache key (not sure if this is useful) Cleaned up a lot of the code, refactored slightly so that the tags are more light weight and rely more on the Administrator and CacheHashMap for functionality. ## OSCache 1.2.5 ### Release Notes (18th May, 2001 - by Mike Cannon-Brookes, mike@atlassian.com) Added ability to turn off file caching (just remove or comment out cache.properties) Removed a pesky (but ineffectual) bug where session caches being removed from disk were throwing NullPointerExceptions ## OSCache 1.2.1 ### Release Notes (10th May, 2001 - by Mike Cannon-Brookes, mike@atlassian.com) Speed improvements in CacheEntry and CacheAdministrator (by Kesav Kumar - kesavk@voquette.com) Fixed DOCTYPE in taglib.tld (also Kesav!) Removed backup / swap / temp files from zip (and changed build file) ## OSCache 1.2 ### Release Notes (28th March, 2001 - by Mike Cannon-Brookes, mike@atlassian.com) Fixed a large bug that resulted in CacheEntry's not refreshing. Large enough in a Caching library to demand a new point release ## OSCache 1.1 ### Release Notes (25th March, 2001 - by Mike Cannon-Brookes, mike@atlassian.com) Moved up to 1.1 because a lot of documentation improving and some small bug fixing has been done Javadocs should now be very readable for all classes and methods Fixed a NullPointer that was being thrown in CacheEntry.needsRefresh() Cleaned up the build file so it now produces releasable zip files easily Added servlet.jar so that the compiling now works OOB (Out Of the Box) ## OSCache 1.0 beta 2 ### Release Notes (20th March, 2001 - by Mike Cannon-Brookes, mike@atlassian.com) Fixed more bugs. Moved things around so that the CacheAdministrator has more functionality and is now a Singleton (per web app context). This means no more depedency on ServletContextListener to start the CacheAdministrator. Therefore we are now Servlet 2.2 / JSP 1.1 compliant! w00! ## OSCache 1.0 beta 1 ### Release Notes (20th February, 2001 - by Mike Cannon-Brookes, mike@atlassian.com) Fixed a few bugs. Greatest of which there is no longer a disk leakage from session caches on disk. Also session caching bugs fixed, usecached bugs fixed - lots of work done here. Implemented to flush individual keys. ## OSCache 1.0 beta 0 ### Release Notes (26th November, 2000 - by Mike Cannon-Brookes, mike@atlassian.com) Initial release of OSCache Conceptualised a few things I've been working on over the past month. Added persistent on disk caching and error tolerance (through <usecached /> tag)