Try Playground
Show / Hide Table of Contents

Working of Entry Processor in Cache

NCache's Entry Processor enables server-side execution of user-defined functions on cache entries, ensuring precise execution across all caching topologies. In the usual update scenario, you actually make two network trips to and from the cache. One is to fetch the element to be modified, and the second is to save the updated value back into the cache. This is where Entry Processors come in handy: you can modify cache entries on the server-side without involving these entries to travel over the network for fetch and update operations. This results in fairly noticeable performance improvement because of the avoidance of network trips and unnecessary consumption of resources.

In the case of partitioned topologies, entries are processed on the same node where they reside. It is recommended to use the ‘Object’ data format to avoid deserialization costs every time an entry is processed.

How does the Entry Processor work?

Entry Processor can be executed on a single cache entry or a set of cache entries. It is particularly useful if you want to process your cache data on the server side.

Once you invoke your Entry Processor to be executed on the server side, the data is processed according to user-specified logic on the server side. Using Entry Processor, you do not have to worry about concurrency as it allows the user to apply a low-level lock on the cache entries it is processing. In case the required entry is locked by the client before executing the entry processor, EntryProcessor provides an option to ignore the lock and access it.

Entry Processors work in parallel across the cluster, on the nodes that contain the entries. This helps in reducing a significant amount of network burden as the extra trips of fetching data to execute the code and saving it back to the cache are eliminated.

The values may be changed or removed and it is up to you how you treat the resultant data:

  • Fetch the data without saving the change in the cache and use it in your application locally.

  • Save the modification in the cache.

  • Update the modification in both the cache and data source through ReadThru and WriteThru operations.

Make sure that the EntryProcessor class that you implement and the resultant values are Serializable before any operation takes place.

See Also

.NET: Alachisoft.NCache.Runtime namespace.

In This Article
  • How does the Entry Processor work?
  • See Also

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top