Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-4648

A little change to cache API in order to shorten code that creates cache

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 4.3-milestone-1
    • 2.1 RC1
    • {Unused} Cache
    • None
    • patch
    • Trivial
    • N/A
    • N/A
    • Awaiting Committer feedback

    Description

      This change will allow to simplify cache creating code.

      Cache would be created in the following manner:

      try {
          this.cache = Utils.getComponent(CacheManager.class).createNewCache(
              new CacheConfiguration(new LRUEvictionConfiguration(500), "xwiki.velocity_template_cache"));
      } catch (CacheException ce) {
          LOG.warn("Creation of Velocity template cache failed - no caching will be performed", ce);
      }
      

      Attachments

        1. LRUCacheConfiguration.java
          2 kB
          ?ukasz Skowro?ski
        2. xwiki_cache_api_changes.patch
          4 kB
          ?ukasz Skowro?ski

        Activity

          People

            tmortagne Thomas Mortagne
            lskowronski ?ukasz Skowro?ski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: