• Getting Started
    • Prerequisites
    • Download and Installation
    • Change Log
  • Developer Guide
    • EvenCart Plugins
      • Development Environment Setup
      • Plugin Structure
      • EvenCart MVC
      • Dependency Injection
      • Domain Entities
      • Database Versions
      • Plugin Settings
      • Data Provider Plugin
      • Payment Processing Plugin
      • Shipping Provider Plugin
      • Authentication Provider
      • Widget Plugin
    • EvenCart API
      • Authentication
      • Requests & Responses
      • API EndPoints
    • Caching
  • Designer Guide
    • How to create a theme
    • Extended Tags
      • Layout Tag
      • Widget Tag
      • Json Tag
      • Css Tag
      • Js Tag
      • Bundle Tag
      • Partial Tag
      • Control Tag
      • Route Tag
      • Global Tag
      • Component Tag
    • Extended Filters
    • Global Objects
  • Packaging & Distribution

Caching

Caching is a very important part of EvenCart. It makes sure that performance of the site is not affected due to repeated database and network calls.

Available Cache Providers

Out of box EvenCart supports the following cache providers. You can however create your own cache provides by either implementing interface ICacheProvider or extending class FoundationCacheProvider<> available in EvenCart.Core.Caching

  1. Request Cache Provider
  2. Memory Cache Provider
  3. Redis Cache Provider

Request Cache Provider

The request cache provider is used for caching data within a single request. The provider ensures that a single request doesn't have to perform same resource intensive operations repeatedly. It is always used no matter caching is enabled or not.

Memory Cache Provider

The memory cache provider is the default cache provider. It caches the data in the Application Pool's memory. While it is okay for small websites, you may want to use some advance cache provider such as Redis for your enterprise level applications.

Redis Cache Provider

Redis is a distributed cache and data store. EvenCart out of box supports Redis Distributed Cache. However it's not enabled by default.

To enable Redis cache support, you need to enable the cache via appsettings.json configuration file. The file is available at the root directory of your EvenCart installation. You need to change the following values to enable Redis Cache.

Note : Redis Cache is not available upto EvenCart versions 1.10

{
 .
 .
 .
  "cacheProvider": "redis",
  "redisConfig": "your redis configuration"
  .
  .
}

If you wish to disable Redis Cache set the cacheProvider setting back to default

Redis Config

Redis config setting above is the configuration string that contains various parameters required to connect to Redis Server. You can read about configuration settings at this Redis Page.

ON THIS PAGE
  • Available Cache Providers
  • Request Cache Provider
  • Memory Cache Provider
  • Redis Cache Provider
© 2021 Sojatia Infocrafts Pvt. Ltd. All rights reserved. Powered by onlyDoc.