Programming the Cache API. namespace Microsoft.ApplicationServer.Caching { public sealed class DataCacheFactory : IDisposable { public DataCacheFactory();

Slides:



Advertisements
Similar presentations
@ScotHillier Web Parts Workflows Pages Libraries App Parts SharePoint-Hosted Apps Provider-Hosted Apps.
Advertisements

Powerpoint Templates Page 1 Powerpoint Templates Server Side Scripting PHP.
HA, locking, and callbacks. Application PUT(K2, V2) Cache2 Cache1 Cache3 Primary for Get(K2) Primary for K3, V3 AppFabric Caching Client Routing Table.
Pertemuan 12.  Create an array  For...In Statement  Join two arrays - concat()  Put array elements into a string - join()  Literal array - sort()
Cosc 5/4730 Android: “Dynamic” data.. Saving Dynamic data. While there are a lot of ways to save data – Via the filesystem, database, etc. You can also.
Ics202 Data Structures. hh tail head (b) LinkedList head tail Element datum next 3 Integer Element datum next 1 Integer Element datum next 4 Integer.
Based on the text by Jimmy Lin and Chris Dryer; and on the yahoo tutorial on mapreduce at index.html
C++ Templates. What is a template? Templates are type-generic versions of functions and/or classes Template functions and template classes can be used.
Thread blocks Waiting… Thread Context Hosted Compute Blob Storage Blob Storage Hosted Compute.
Caching: How It Works and When You Should Use It Shy Cohen Principal, Shy Cohen Consulting AAP314.
Mark Simms Principal Program Manager Windows Azure Customer Advisory Team.
PerformanceScalability Customer Advisory Team (CAT) Engagement Scenario Windows Azure web application Tracks election results during local and national.
CPSC 388 – Compiler Design and Construction
More on the STL vector list stack queue priority_queue.
Working with Regions and Tags. var dcf = new DataCacheFactory(); //get the cache named "TestCache" var cache = dcf.GetCache("TestCache"); //Add a region.
Security & Management. ArgumentDescription - ConnectionString Connection information for the cluster (will differ based on provider) -ProviderLoads.
Blob Storage. What is Blob Storage Windows Azure Blob storage is a service for storing large amounts of unstructured data that can be accessed from anywhere.
Ingo Rammer thinktecture.
X.509 Certificate Management in.NET. A public key certificate (certs) is digitally signed document that is commonly used for authentication and secure.
Deployment of web Site. Preparing the web site for deployment you now have two versions of web site 1 -one running in the production environment 2-one.
Memcached HTTPd mcd DB HTTPd mcd [memcached 설치 및 구동 ] -- memory object caching system *) 설정 없음 1. 설치 - memcached or /usr/ports/databases/memcached.
MAHADEV KONAR Apache ZooKeeper. What is ZooKeeper? A highly available, scalable, distributed coordination kernel.
DNS and C# SWE 344 Internet Protocols & Client Server Programming.
Software Architecture for ColdFusion Developers Unit 4: Application Events and Global Variables.
XML What is XML? Why do I need it? How do I use it?
HeuristicLab. Motivation  less memory pressure no DOM single pass linear process  less developer effort no interfaces to implement  modularity & flexibility.
HTML5. HTML5’s overall theme The browser as a rich application platform rich, cross-device user interfaces offline operation capability hardware access.
.NET Framework Danish Sami UG Lead.NetFoundry
C++ Basics Structure of a Program. C++ Source Code Plain text file Typical file extension .CPP Must compile the C++ source code without errors before.
Generalized Containers CSIS 3701: Advanced Object Oriented Programming.
Maintaining State MacDonald Ch. 9 MIS 324 MIS 324 Professor Sandvig Professor Sandvig.
Exception Handling Part 2: Creating and Throwing Exceptions CSIS 3701: Advanced Object Oriented Programming.
ASP.NET Caching - Pradeepa Chandramohan. What is Caching? Storing data in memory for quick access. In Web Application environment, data that is cached.
Ant Presentation by: Bart Taylor. What is Ant? The simple definition: A Java-based build tool The Official Definition: “Apache Ant is a Java-based build.
Boot Sequence, Internal Component & Cisco 3 Layer Model 1.
A programmer’s wife tells him, “Would you mind going to the store and picking up a loaf of bread. Also, if they have eggs, get a dozen.” The programmer.
Designing and Delivering Scalable and Resilient Web Services Ron Jacobs Sr. Technical Evangelist, Microsoft
Ingo Rammer thinktecture
Week 2 - Friday.  What did we talk about last time?  Computing Big Oh.
Using variable Variables are used to store values.
Expenses Timesheets Approvals Expense capture Timesheets Expense capture Timesheets Expense capture Timesheets.
Session, TempData, Cache Andres Käver, IT Kolledž
Assemblies. 2 Objectives Introduce assemblies –concept –creation –naming Discuss deployment –main.exe –dependent assemblies.
APLIKACIJE KOJE SU IZVAN SEBE Domagoj Pavlešić, dizzy.hr.
Chapter  Array-like data structures  ArrayList  Queue  Stack  Hashtable  SortedList  Offer programming convenience for specific access.
#SummitNow Workflow Dashboard Custom Dashlet (Replacement for My Tasks) 14 November 2013 Bill Young, Flatirons Solutions.
© Copyright SELA software & Education Labs Ltd Baruch Hirsch St.Bnei Brak Israel 1 בס " ד.
Data in Windows 10 UWP Andy Wigley XML, JSON, SQLite or EF Core ?
Phonegap Bridge – Storage CIS 136 Building Mobile Apps 1.
Andres Käver, IT Kolledž public interface IPersonRepository : IDisposable { IQueryable All { get; } IQueryable AllIncluding( params Expression.
Building Web Applications with Microsoft ASP
Racket CSC270 Pepper major portions credited to
ASP.NET Caching.
Pre-assessment Questions
Luigi Pampaloni BizTalk Solutions Architect LPYSoft Ltd
Enabling System Elements
SESSION CODE: ASI313 Windows Server AppFabric Caching: What It Is and When You Should Use It Jon Flanders.
Windows Server AppFabric Cache
Module 1–Windows AppFabric Cache
Bob Tabor | Microsoft Azure Fundamentals: Data Understanding Microsoft Azure Storage Queues Bob Tabor |
06 | Case Studies James Chambers | Author, Microsoft ASP.NET/IIS MVP
Repository pattern Andres Käver, IT Kolledž 2016/2017 Spring.
L3. Necessary Java Programming Techniques
L3. Necessary Java Programming Techniques
UWP Application Data: Building a continuous application experience
Lists in Python Creating lists.
The programmer returns with 12 loaves of bread.
STORE MANAGER RESPONSIBILITIES.
© 2016, Mike Murach & Associates, Inc.
Data Structures & Programming
Presentation transcript:

Programming the Cache API

namespace Microsoft.ApplicationServer.Caching { public sealed class DataCacheFactory : IDisposable { public DataCacheFactory(); public DataCacheFactory( DataCacheFactoryConfiguration configuration); public void Dispose(); public DataCache GetCache( string cacheName); public DataCache GetDefaultCache(); }

DataCacheFactoryConfiguration

element --> <section name="dataCacheClient" type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, Microsoft.ApplicationServer.Caching.Core, Version= , Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

public DataCacheItemVersion Add(string key, object value); public DataCacheItemVersion Add(string key, object value, TimeSpan timeout); public DataCacheItemVersion Put(string key, object value); public DataCacheItemVersion Put(string key, object value, TimeSpan timeout); Parameterdescription keyKey of item in the distributed cache valueValue of object stored in the cache (serialized) timeoutHow long before the item should expire

//create DataCacheFactory based on config file var dcf = new DataCacheFactory(); //get the cache named "TestCache" var cache = dcf.GetCache("TestCache"); //Add an item called "Test" - throws if exists cache.Add("Test", new Data {TheData = "Test" }); //Put an item called "Test2" - overwrites if exists cache.Put("Test2", new Data { TheData = "Test2" }); //Get "Test3" - add if not in cache (cache-aside) var test3 = cache.Get("Test3") as Data; if (test3 == null) { test3 = new Data {TheData = "Test3" }; cache.Add("Test3", test3); }

element --> <section name="dataCacheClient" type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, Microsoft.ApplicationServer.Caching.Core, Version= , Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <localCache isEnabled="true" sync="TimeoutBased" objectCount="100000" ttlValue="300" />