Try Playground
Show / Hide Table of Contents

Method GetCacheItemBulk

GetCacheItemBulk(IEnumerable<String>, ReadThruOptions)

Retrieves the specified CacheItems from the cache object. This overload also allows specifying the ReadThruOptions. If read-through is set and the object does not exist in the cache, the object will be fetched from the data source and added to the cache.

Declaration
IDictionary<string, CacheItem> GetCacheItemBulk(IEnumerable<string> keys, ReadThruOptions readThruOptions = null)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.String> keys

IEnumerable list of unique identifiers for the cache items to be retrieved.

ReadThruOptions readThruOptions

ReadThruOptions regarding reading from data source. It can be either ReadThru, ReadThruForced or none.

Returns
Type Description
System.Collections.Generic.IDictionary<System.String, CacheItem>

The retrieved cache items as key-value pairs.

Examples

The following example demonstrates how to retrieve the cache items with ReadThruOptions.

ICache cache = CacheManager.GetCache("demoClusteredCache");

List<string> keys = new List<string>()
{
    "Product0",
    "Product1",
    "Product2"
};

ReadThruOptions readThruOptions = new ReadThruOptions(ReadMode.ReadThru);
IDictionary<string, CacheItem> items = cache.GetCacheItemBulk(keys, readThruOptions);
In This Article
  • GetCacheItemBulk(IEnumerable<String>, ReadThruOptions)

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