Verint | Telligent Community
Verint | Telligent Community
  • Site
  • User
  • Site
  • Search
  • User
Verint Community 11.x
  • Verint Community
Verint Community 11.x
User Documentation Caching
  • User Documentation
  • Ask the Community
  • API Documentation
  • Manager Training
  • Developer Training
  • Tags
  • More
  • Cancel
  • New
  • Verint Community 11.x User Documentation
  • +How do I install Telligent Community?
  • Getting Started
  • +General Topics
  • +How do I get to the administration panel?
  • +How do I administer members?
  • +How do I change permissions?
  • +What is an application?
  • +What is a group?
  • How should I define groups and applications in my community?
  • +What is a forum?
  • +What is a blog?
  • +What is a gallery?
  • +What is a wiki?
  • +What is a calendar?
  • +What is ideation?
  • +What is a Knowledge Collection?
  • +How do I view reports?
  • +What is a theme?
  • +What is an Achievement and how do I change or manage Achievements?
  • +How can I enable single sign-on (SSO)?
  • +How do I install chat support?
  • +How do I configure email integration?
  • +How do I translate my community?
  • How do I configure automations for my community?
  • +How can I identify abuse or SPAM within the community?
  • -Community Troubleshooting Guide
    • How can I diagnose a problem or get help?
    • SQL times out when accessing the site
    • Database maintenance
    • Caching
    • How can I improve the technical performance of my community?
    • Can't insert an image using the enhanced text editor after upgrading
    • CFS on the Visual Studio development server
    • Common things to check when using Forms Authentication
    • Common webfarm configuration questions
    • Configuration problems
    • Enable AllowDotInPath in UrlScan
    • Enable Integrated Pipeline on IIS7
    • Fix access to uploaded files
    • How can I customize messages (errors and user registration)?
    • Search index problems
    • Search stop words
    • Troubleshoot search errors
    • Troubleshoot the Telligent Job Service
  • +How do I monitor the health of my community?
  • +Release Notes for Community 11
  • Accessibility
  • What are Points and how do I change or manage points?
  • Change system defaults for locking out users
  • How do I assign a site role to a user?
  • How do I change my password?
  • How do I change the options in my user profile?
  • How do I configure the available profile options?
  • How do I create an API key?
  • How do I customize my community in an upgrade-safe way?
  • How do I edit my profile?
  • How do I enable Google Analytics on Verint Community?
  • How do I show embedded tweets with videos (or pictures)?
  • IFRAME inclusion in the community
  • Shortened URLs
  • What are profile fields and how do I manage them?
  • What are Ratings?
  • What are the SEO features in Verint Community?
  • What is a leaderboard?
  • What is the difference between Related / Recommended content, and how do they work?

Caching

[toc]

A cache allows applications to store results from expensive data operations (e.g., a database call or web service request) so they can quickly accessed if requested multiple times.

Hierarchy

The Telligent cache object is built by combining one or more layers together to form a single logical structure. Each layer sits atop another, creating a hierarchy that defines how requests are satisfied:

When a retrieval request comes in, each layer is searched until the item is found. If the item is found, that item is copied to all layers above the cache that satisfied the request. This allows cached objects to move from slower caches to faster caches, maximizing locality principles and reducing global system stress.

Providers and scope

Each layer in the hierarchy defines how it caches objects. A layer specifies its supported caching behavior by using one or more CacheScope values. Only requests containing the supported scope will be sent to a provider. 

CacheScope values are:

Name Description
None No location specified.
Context The Context location is specified.  This scope is for storing items for a short amount of time and is typically private to the user.
Process The Process location is specified. This scope stores items inside of the running process and is shared among users.
Distributed The Distributed location is specified. This scope is used when items are available to all running processes. Typically, distributed-only caches will be the slowest cache types.
All All possible scope values are specified.

The Telligent cache object comes with built-in providers that are available for use. They include:

  • HttpContext (Context scope): Items are cached inside the current HTTP request. This is the fastest cache available for web requests and should always be designed at the lowest level cache in a website environment.

  • ASP.NET (Process scope): Items are cached inside the HttpRuntime object. Items cached using this provider are available to all threads that access the same HttpRuntime object. 

         NOTE: This cache can be used outside of a web request.

  • AppFabric (Distributed scope): Items are cached using the Microsoft AppFabric distributed cache system. Items in this cache are available to all processes that can access the AppFabric server.

Default timeout

When items are placed into cache, it is not necessary to give a timeout. In these cases, the currently configured default timeout value is used. The out-of-the-box default timeout is 1 minute and 40 seconds.

Many objects in Telligent Community Server use the default timeout value. In addition to a very simple scaling mechanism, controlling the default timeout allows for finer control over the cache system in webfarm scenarios where staleness is a concern. Generally, if more than one server is running a site, the default timeout value should be low to keep staleness at a minimum. The lower the value, the less likely you are to see staleness - but at the cost of decreased cache performance.

Default timeouts are set inside of the caching configuration XML settings. For more information, please see the Configuration documentation.

Cache factors

Cache factors allow us to complete the picture of how long items should be cached. Cache factor values can be set for any cache layer and is used as a universal adjustment on timeout.

Where cache factors become important is when a cache is set up using a distributed cache. For example, assume we have a website that contains many nodes (webfarm). Each node is running the AspNetCache provider to cache items locally on each server. Because we're in a webfarm scenario, we have to reduce our default timeout because we can't risk staleness and other cache inconsistencies.

To increase the cache performance of the website, we want to introduce a distributed cache so longer-lived objects can be held in memory for longer amounts of time. In this situation, we want to increase the default timeout because we know that all web nodes will keep the distributed cache in sync as long as we relay the changes back to the distributed cache server. But this poses a problem: If we increase the default timeout, then the locally cached items in the AspNetCache will risk being stale in any web server that doesn't handle the data operation. But if we do not increase the default timeout, objects will be removed from distributed cache much more frequently than they need to be.

To solve this problem, we can use a cache factor on the distributed layer. By setting a cache factor on the distributed layer, we can keep a lower default timeout for our local server caches. Items sent to distributed cache will be cached longer, by default, then items cached on the local server.

It should be noted that all timeouts are subjected to the factor, not just default timeouts.

Cache factors are set inside of the caching configuration XML settings. For more information, see the Configuration documentation.

Overrides

Included in the Telligent cache system is a mechanism allowing runtime adjustments to be made to cache operations. This allows users to modify values used in Community Server (or added by a third-party component) if they have a site-specific need to do so. Overrides should be used sparingly, but they offer a level of control that may yield a large benefit.

Before an item is sent to any cache layer, conditions are checked to see if a particular override should be applied. If a condition is met, that override is triggered and no further conditions are processed. This means that only one override can be executed for each cache operation.

Conditions can be defined using any of the following constructs:

Condition Description
startsWith A condition that attempts to match keys or tags against a starting pattern.
endsWith A condition that attempts to match keys or tags against an ending pattern.
regex A condition that attempts to match keys or tags against a regular expression.
object A condition that attempts to match the cached item's type against the specified object type.

Additionally, conditions can be combined to form composite conditions. Composite conditions include:

Condition Description
and All child conditions must match in order for this composite to match.
or Any child condition must match in order for this composite to match.
not A special case composite that must contain exactly one child condition. The child condition must be false in order for this composite to match.

Overrides are defined declaratively using XML. For more information on how to set and configure overrides, see the Configuration documentation.

  • cache
  • Share
  • History
  • More
  • Cancel
Related
Recommended
  • Telligent
  • Professional Services
  • Submit a Support Ticket
  • Become a Partner
  • Request a Demo
  • Contact Us

About
Privacy Policy
Terms of use
Copyright 2024 Verint, Inc.
Powered by Verint Community