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

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1 RC1
    • Fix Version/s: 4.3-milestone-1
    • Component/s: {Unused} Cache
    • Labels:
      None
    • keywords:
      patch
    • Difficulty:
      Trivial
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Pull Request Status:
      Awaiting Committer feedback
    • Similar issues:

      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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response: