Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-2518

Improve error handling of railo.commons.io.cache.Cache


    • Type: Enhancement
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:


      The railo.commons.io.cache.Cache interface declares that most methods can throw IOExceptions, however a handful of methods cannot throw. Namely:

      • getCacheEntry(String key,CacheEntry defaultValue) (However, getCacheEntry(String key) DOES throw IOException)
      • getValue(String key,Object defaultValue) (However, getValue(String key) DOES throw IOException)
      • put(String key, Object value,Long idleTime,Long until)
      • contains(String key)
      • hitCount()
      • missCount()
      • getCustomInfo()

      The main concern is that if there is an error in the underlying cache engine and user code trying to, say, set an item into the cache--- I have no way in my code to notify that something went horribly wrong and nothing was set since I'm not allowed to throw an error. I can log the error, but that provides no feedback and the application will assume that the cache is behaving normally.

      I suggest that the methods above be allowed to throw an IOException to allow me to write a cache extension that is capable of notifying the application when/if a fatal error has occurred while trying to access the underlying cache engine.

        Gliffy Diagrams




              • Assignee:
                micstriit Michael Offner
                bdw429s Brad Wood
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: