layout: true
--- class: center, middle # CachingWebAPI => ( press > ) https://ignatandrei.github.io/Presentations/CachingWebAPIprez.html Code at https://ignatandrei.github.io/Presentations/CachingWebAPI.zip --- # Agenda 0. About me 2. Caching - simple 3. Caching - Expiration 4. Caching - Distributed 5. Caching with SqlDependency 7. Discussion / Questions ? --- class: center, top # About me ![:img ignat, 10%](ignat.jpg) Andrei Ignat http://msprogrammer.serviciipeweb.ro/ www.ASP.NET forum moderator YouTube 5 minutes .NET and tools : http://bit.ly/5MinTools Book Making Open Source Component : http://bit.ly/NetOpenSourceComponent Book Copy Paste from StackOverflow : https://amzn.to/2PQ8EDc Monthly meetings: https://www.meetup.com/Bucharest-A-D-C-E-S-Meetup/ --- class: center, top # Caching - manual Forever caching - similar with Lazy
See class ManualCaching See Program.cs in CachingNetConsole --- class: center, top # Caching - Expiration See IMemoryCache and class clsCachedData See Program.cs in CachingNetConsole Start docker and run createDistributedCache.ps1 . Also run dep.sql Start CachingNetWebAPI and see in VisualAPI example "show simple caching" --- class: center, top # Caching - Distributed code at clsDistributedCachedData and a simpler example at GetTimeCachedSimpler Visual API Example "show Distributed caching" and "show Distributed simpler code caching" Also see database DistCache Can start 2 instances of webapi. --- class: center, top # Caching with SqlDependency Docs: https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/detecting-changes-with-sqldependency Depends on ServiceBroker . Show a simpler example with SqlTableDependency Code at CachingDepts See example "Show cached EF" --- class: center, top # Questions? Andrei Ignat http://msprogrammer.serviciipeweb.ro/ www.ASP.NET forum moderator YouTube 5 minutes .NET and tools : http://bit.ly/5MinTools Book Making Open Source Component : http://bit.ly/NetOpenSourceComponent Book Copy Paste from StackOverflow : https://amzn.to/2PQ8EDc Monthly meetings: https://www.meetup.com/Bucharest-A-D-C-E-S-Meetup/