Giter VIP home page Giter VIP logo

aspnet_mvc5_caching's Introduction

AspNet_MVC5_Caching

A couple of MVC5 projects that takes a look at Caching using ObjectCache & MemoryCache. Also demonstrates partial views, AJAX and DI.


Developed with Visual Studio 2015 Community


###Techs

Tech
C#
MVC5
AJAX
jQuery
Bootstrap
StructureMap.MVC5

'OutputCacheExample'

This project focuses on the 'OutputCache' attribute used to control caching on controller actions.

FEATURES

Feature
Caching data for a length of time using 'Duration'
Specifying were data should be cached using 'System.Web.UI.OutputCacheLocation'
Specifying cache profiles in web config.
Project also demonstrates use of partial views and AJAX calls

TESTING

Navigate to the following urls and follow the instructions. The thing to watch out for is the 'Created' date.

Url Description
http://localhost:[YourPortNumber]/Caching Demonstrates caching data for a length of time using 'Duration'
http://localhost:[YourPortNumber]/Caching/LongCacheProfile Demonstrates caching data for a length of time using 'CacheProfile'
http://localhost:[YourPortNumber]/Caching/ShortCacheProfile Demonstrates caching data for a length of time using 'CacheProfile'
http://localhost:[YourPortNumber]/Caching/CacheByParm Demonstrates caching data by parameter
http://localhost:[YourPortNumber]/Caching/AjaxCaching Demonstrates caching data requested from an ajax call

'MemoryCacheExample'

This projects contains a custom in-memory caching implementation using System.Runtime.MemoryCache.

FEATURES

Feature
Caching using System.Runtime.MemoryCache Here
Adapter, Decorator patterns Here
Light-weight Repository Pattern Here
Dependency Injection with StructureMap Here
AJAX calls Here

TESTING

Just run the 'MemoryCacheExample' project where you will be redirected to the 'Customer' view.

Filter the list of customers from the droplist provided.

Observe the 'access date' for each customer, you will notice that it only changes after 1 minute.


###Resources

Title Author Website
ASP.NET Caching MSDN
ASP.NET Caching: Techniques and Best Practices MSDN
Caching infrastructure in MVC4 with C# Andras Nemes dotnetcodr

aspnet_mvc5_caching's People

Contributors

pauljamesmillar avatar pj-mill avatar

Stargazers

Vinh Cao avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

amitsinghr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.