All Projects → moozzyk → EFCache

moozzyk / EFCache

Licence: MS-PL license
Second Level Cache for Entity Framework 6.1

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to EFCache

loQL
loQL is a lightweight, open source npm package that caches API requests with service workers, unlocking performance gains and enabling offline use.
Stars: ✭ 49 (-49.48%)
Mutual labels:  caching
libcache
A caching library that provides an in-memory and file based cache for Ruby
Stars: ✭ 25 (-74.23%)
Mutual labels:  caching
wagtail-cache
A simple page cache for Wagtail based on the Django cache middleware.
Stars: ✭ 63 (-35.05%)
Mutual labels:  caching
sfsdb
Simple yet extensible database you already know how to use
Stars: ✭ 36 (-62.89%)
Mutual labels:  caching
hoardr
⚠️ ARCHIVED ⚠️ manage cached files
Stars: ✭ 19 (-80.41%)
Mutual labels:  caching
kdk memcached object cache
Object cache driver for Memcached in WordPress (based on Memcached Redux)
Stars: ✭ 20 (-79.38%)
Mutual labels:  caching
SapientGuardian.EntityFrameworkCore.MySql
MySQL database provider for Entity Framework Core
Stars: ✭ 54 (-44.33%)
Mutual labels:  entity-framework
Beef
Business Entity Execution Framework
Stars: ✭ 95 (-2.06%)
Mutual labels:  entity-framework
Gridify
Easy and optimized way to apply Filtering, Sorting, and Pagination using text-based data.
Stars: ✭ 372 (+283.51%)
Mutual labels:  entity-framework
maki
[beta] persistent memoization of computations, e.g. for repeatable tests and benchmarks
Stars: ✭ 16 (-83.51%)
Mutual labels:  caching
DatatableJS
Jquery datatable with entity framework using MVC html helper
Stars: ✭ 25 (-74.23%)
Mutual labels:  entity-framework
EFSqlTranslator
A standalone linq to sql translator that can be used with EF and Dapper.
Stars: ✭ 51 (-47.42%)
Mutual labels:  entity-framework
Foundatio.Samples
Foundatio Samples
Stars: ✭ 34 (-64.95%)
Mutual labels:  caching
infinispan-spring-boot
Infinispan Spring Boot starter. Use this starter in your Spring Boot applications to help you use Infinispan+Spring integration in embedded and client/server mode
Stars: ✭ 61 (-37.11%)
Mutual labels:  caching
powered-cache
The most powerful caching and performance suite for WordPress.
Stars: ✭ 31 (-68.04%)
Mutual labels:  caching
PHP-File-Cache
Light, simple and standalone PHP in-file caching class
Stars: ✭ 34 (-64.95%)
Mutual labels:  caching
webuntis
A API library that makes it easy to access the Webuntis JSON RPC 2.0 API
Stars: ✭ 22 (-77.32%)
Mutual labels:  caching
DailyBugle
📰Modern MVVM Android application following single activity architecture which fetches news from 🕷️ news API. this repository contains some best practices ⚡ of android development
Stars: ✭ 17 (-82.47%)
Mutual labels:  caching
trickster
Open Source HTTP Reverse Proxy Cache and Time Series Dashboard Accelerator
Stars: ✭ 1,753 (+1707.22%)
Mutual labels:  caching
bkt
bkt is a subprocess caching utility, available as a command line binary and a Rust library.
Stars: ✭ 117 (+20.62%)
Mutual labels:  caching

Second Level Cache for Entity Framework 6.1+

Entity Framework does not currently support caching of query results. A sample EF Caching provider is available for Entity Framework version 5 and earlier but due to changes to the provider model this sample provider does not work with Entity Framework 6 and newer. This project is filling the gap by enabling caching of query results for Entity Framework 6.1+ applications.

This project was moved from https://efcache.codeplex.com

You may still find some useful information there:

How to get it

You can get it from NuGet - just install the EntityFramework.Cache NuGet package

How to use it

The project uses a combination of a wrapping provider and a transaction interceptor. A simple InMemoryCache is included in the project. To use it you need first configure EF using code based configuration. Here is an example of how such a configuration looks like.

public class Configuration : DbConfiguration
{
  public Configuration()
  {
    var transactionHandler = new CacheTransactionHandler(new InMemoryCache());

    AddInterceptor(transactionHandler);

    var cachingPolicy = new CachingPolicy();

    Loaded +=
      (sender, args) => args.ReplaceService<DbProviderServices>(
        (s, _) => new CachingProviderServices(s, transactionHandler, 
          cachingPolicy));
  }
}

Starting with version 1.1.1 you can also use the new static EntityFrameworkCache.Initialize() method to configure EF to use EFCache. The Initialize method should be invoked at app startup (before EF is used) - e.g. in the application static constructor. To initialize EFCache with the built-in InMemoryCache you can use the following code:

EntityFrameworkCache.Initialize(new InMemoryCache());

You can find more details in my blogpost

Disclaimer

I am providing code in the repository to you under an open source license. Because this is my personal repository, the license you receive to my code is from me and not my employer (Facebook)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].