• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Show / Hide Table of Contents
  • Administrator's Guide
  • NCache Architecture
    • Cache Topologies
    • Cache Cluster
    • Local Cache
    • Cache Client
    • Client Cache
    • Data Load Balancing
    • Cache Server Backward Compatibility
    • Client Backward Compatibility
    • Eviction
    • Indexing
    • Runtime Data Sharing
    • Portable Data Types
    • Class Versioning
    • IP Binding with Multiple NICs
    • Graceful Node Down
    • Separate Cache Host Process
    • Self Healing Dynamic Clustering
  • Configuring Caches
    • Create Cache
      • Creating Local Cache
        • Create New Cache
        • Add Existing Cache
      • Creating Clustered Cache
        • Create New Cache Cluster
        • Add Existing Cache Cluster
    • Remove Cache
    • Clear Cache Contents
    • Adding Server Node in Cache Cluster
    • Removing Server Node from Cache Cluster
    • Configuring Basic Cache Settings
      • Cache Size
      • Cache Isolation Levels
      • Cache Data Expiration
      • Cache Data Format
    • Configuring Cache Cluster Settings
      • Ports
      • Operation Timeout
      • Static Replication Interval
      • Connection Retries
      • Retry Interval
    • Add Test Data to Cache
    • Deploy Providers
    • Configuring Query Indexes
    • Registering Classes for Compact Serialization
      • Registering Non-Generic Classes
      • Unregistering Non-Generic Classes
      • Registering Generic Classes
      • Registering Generic Classes Using Generic Type Handler
    • Registering Classes for Portable Data Sharing
    • Configuring Data Source Providers
      • Read-Through Provider
      • Write-Through Provider
      • Write-Through Provider for Write-Behind Operations
    • Configuring Cache Startup Loader
    • Configuring Cache Level Events
    • Configuring Cache Activity Events
    • Configuring Eviction Policy
    • Configuring Compression
    • Configuring Email Notifications
    • Binding Cluster and Client/Server IP with Multiple NICs
      • Binding Cluster with a Dedicated IP
      • Binding Client/Server with a Dedicated IP
    • Configuring Heartbeat
    • Configuring MapReduce
    • Configuring Communication Reliability
    • Auto Start Cache on Boot
    • Nagling
    • Dual Socket
    • Error Logging
    • Configuration Files
      • Client Side Configurations
        • Client Config
        • EFCaching Config
      • Server Side Configurations
        • Cache Config
        • Bridge Config
        • Security Config
      • Cache Server Configuration
  • Management Operations
    • Start Cache
    • Stop Cache
    • Restart Cache
    • Manage Cache Service on a Server Node
    • Apply Configuration
    • Hot Apply Configuration
    • Reset Configuration
    • Data Load Balancing
  • Configuring Cache Clients
    • Adding Client Node in Cluster
    • Removing Client Node from Cluster
    • Configuring Client Node Settings
    • Creating Client Cache
    • Enable Client Cache on Client Nodes
    • Disable Client Cache on Client Nodes
    • Removing Client Cache
    • Configuring Client Cache Settings
  • Configuring Security
    • Configuring Security for Cache Management
    • Configuring Security for Cache
    • Configuring Security for Client Nodes
    • Configuring Encryption for Cache
    • Configure SSL/TLS Encryption in NCache
  • Configuring Bridge for WAN Replication
    • Creating Clustered Bridge
    • Adding Clustered Caches to Bridge
    • Configuring Bridge Settings
    • Configuring Conflict Resolver
    • Changing Cache Syncronization Modes
    • Configuring Master Cache
    • Force State Transfer
    • Connect/Disconnect Cache in Bridge
    • Remove Cache from Bridge
    • Bridge Management
  • NCache on Docker
    • Using NCache Docker Images
    • Customize NCache Dockerfile
  • Monitoring NCache
    • Cache Counters
    • Monitoring Caches using NCache Manager
      • Changing Management Port of Cache Node
      • Configuring Counters to Display
      • Browse Cache Statistics
      • Cluster Health
      • Monitoring Cache Clusters using NCache Email Alerts
    • Monitoring Caches using NCache Monitor
      • Monitoring with Built-In Dashboard
      • Monitoring with Custom Dashboard
    • Monitoring Bridge using NCache Manager
    • Monitoring NCache using Windows PerfMon Tool
      • Monitoring Cache Server Counters Using PerfMon
      • Monitoring Cache Client Counters Using PerfMon
      • Monitoring Bridge Counters Using PerfMon
    • Logging in NCache
      • NCache Log Viewer
      • NCache Monitor Logging
      • Performance Counters Logging
      • Windows Event Logging
      • Email Notifications on NCache Events
      • Cache Server Logging
      • Client Side API Logging
      • Cache Event IDs
    • Troubleshooting NCache Monitoring
      • Computer Name Not Found
      • Diskperf Not Installed
      • No READ Access to the Perflib Subkeys
      • Unable to Connect to Remote Server
    • IPV6 Support
  • Upgrading NCache Versions
    • Live Upgrade NCache Version
    • Upgrade NCache Version Offline
  • Apply Windows Patches on NCache Server

EFCaching Config

Note

This feature is only available in NCache Enterprise edition.

EFCaching configuration file contains information regarding Entity Framework provider. It is installed with NCache and is located at %NCHOME%/config. efcaching.ncconf is used for enabling NCache in Entity Framework applications. The configurations are stored in an efcaching.ncconf file.

EFCaching configuration file is explained below:

  • Provider Configuration contains cache and caching policy related information. Below are the changes required in efcaching.ncconf.
<configuration>
<app-config app-id = "PersonNameApp" mode = "analysis|caching">
  • app-id: Is an identifier for an application. The configuration can contain multiple configuration settings for different applications. App-id for efcaching.ncconf should be same as in application otherwise it will prompt an error.

  • Mode: Can either be "Analysis" or "Caching". (Hot Applicable). Default = 'Caching'

  • "Analysis" mode is used for monitoring the number of times each query executes and then it generates a report. Report contains the Query text and the call count for each query. This report can be used in Custom policy. No caching is done at this mode.

<analysis-policy log-path = "" analysis-time = "60" cache-enable-threshold = "5" default-expiration-type = "absolute|sliding" default-expiration-time = "180" dbsyncdependency = "true"/>
  • Log-path: Path at which analysis log files will be generated. Default = <InstallDir>/log-files/efcaching-analysis-logs/

  • Analysis-time: Time for which the analysis will run. Default = 60 min

  • Cache-enable-threshold: Caching will automatically be enabled for queries whose call-count exceeds this threshold. Default = 5

  • Default-expiration-type: Default expiration type for analyzed queries. Default = absolute

  • Default-expiration-time: Default expiration time for analyzed queries. Default = 180 sec (3 min)

  • dbsyncdependency: Determine whether to enable database-dependency or not. Default = "true"

  • For "Caching" mode, wrapping provider will cache the results of all the specified queries. Caching mode works on either cacheall policy or custom policy. Both policies have their own specifications. Whenever update is detected (either UPDATE, INSERT or DELETE) in a respective database, the provider invalidates affected cache entries by evicting all cached queries which were dependent on any of the updated tables.

<cache-policy default-policy = "cacheall|custom" database = "none|oracle10i2|sqlserver" cache-id ="mycache" enabled = "true">
  • Default-policy: The default policy for caching. (Hot Applicable). Default = 'cacheall'

  • Database: Database information is collected to create database sync dependency. (Hot Applicable). Default = 'none'

  • Cache-id:: Name of the cache. Default = 'mycache'

  • Enabled: Determine whether the policy is in effect or not. (Hot Applicable). Default = 'true'

  • For cacheall policy, it caches all the queries and their results.

   <cacheall-policy expiration-type = "absolute|sliding" expiration-time = "1800" dbsyncdependency ="true"/>
  • Expiration-type: Type of expiration, it can be 'sliding' or 'absolute'. Default = 'absolute'.

  • Expiration-time: Default = 180 sec (3 min)

  • dbsyncdependency: Determine whether to enable the database-dependency or not. Default = 'true'

  • For custom policy, it includes user-configurable list of queries that should be cached with their results. When custom policy is selected, only those queries results will be cached for which the caching is enabled. You can also specify custom caching policy for all queries.

<custom-policy>

  <query query-text = "" ["SELECT FROM Products"] | stored-procedure-name = "" ] caching ="true" expiration-type = "absolute"| sliding = "" expiration-time = "180" dbsyncdependency ="true"/>

</custom-policy>

</cache-policy>

</app-config>

</configuration>
  • Query-text: Text of the query whose result is to be cached OR name of a stored procedure whose output is to be cached.

  • Caching: Determines whether caching is enabled for this query or not. Default = 'true'

  • Expiration-type: Type of expiration, it can be 'absolute' or 'sliding'. Default = 'absolute'.

  • Expiration-time: Default = 180 sec (3 min)

  • dbsyncdependency: Determine whether to enable database-dependency for analyzed queries. Default = " true"

  • In case of stored procedures, query text will be the name of a stored procedure, and there will be no default policy or database sync dependency.

User can cache stored procedures result with expiration only, no database dependency is needed here.

Back to top Copyright © 2017 Alachisoft