All Projects → levyfan → guava-cache-redis

levyfan / guava-cache-redis

Licence: MIT license
implement guava cache interface backed by redis

Projects that are alternatives of or similar to guava-cache-redis

ssm
Java企业级电商项目
Stars: ✭ 34 (+0%)
Mutual labels:  guava
Uragano
Uragano, A simple, high performance RPC library. Support load balancing, circuit breaker, fallback, caching, intercepting.
Stars: ✭ 28 (-17.65%)
Mutual labels:  redis-cache
mnemosyne
Multilayer Cache Manager supporting multiple In-momery & Redis configurations
Stars: ✭ 16 (-52.94%)
Mutual labels:  redis-cache
spring-boot-redis-guava-caffeine-cache
springboot 使用 redis guava caffeine 缓存示例
Stars: ✭ 137 (+302.94%)
Mutual labels:  guava
springCloudShop
🚀 用spring-cloud 基于tcc做的简单下单流程
Stars: ✭ 54 (+58.82%)
Mutual labels:  guava
centminmod-magento2
Magento 2.2.2 Install Guide For Centmin Mod Nginx LEMP Stacks
Stars: ✭ 16 (-52.94%)
Mutual labels:  redis-cache
sessionx
Go's web session library.
Stars: ✭ 75 (+120.59%)
Mutual labels:  redis-cache
redis-developer.github.io
The Home of Redis Developers
Stars: ✭ 28 (-17.65%)
Mutual labels:  redis-cache
springboot-action
Spring Boot 入门学习示例。
Stars: ✭ 29 (-14.71%)
Mutual labels:  guava
cachegrand
cachegrand is an open-source fast, scalable and secure Key-Value store, also fully compatible with Redis protocol, designed from the ground up to take advantage of modern hardware vertical scalability, able to provide better performance and a larger cache at lower cost, without losing focus on distributed systems.
Stars: ✭ 87 (+155.88%)
Mutual labels:  redis-cache
Immutables
Annotation processor to create immutable objects and builders. Feels like Guava's immutable collections but for regular value objects. JSON, Jackson, Gson, JAX-RS integrations included
Stars: ✭ 3,031 (+8814.71%)
Mutual labels:  guava
database-journal
Databases: Concepts, commands, codes, interview questions and more...
Stars: ✭ 50 (+47.06%)
Mutual labels:  redis-cache
cache
Laravel & Lumen Cache Service | File and Redis cache system
Stars: ✭ 19 (-44.12%)
Mutual labels:  redis-cache
assertj-guava
AssertJ Guava is a library of assertions specific to Guava types like Multimap, Optional and Table
Stars: ✭ 36 (+5.88%)
Mutual labels:  guava
tutorials-java
Java Spring related tutorial collection
Stars: ✭ 22 (-35.29%)
Mutual labels:  guava
SpeQL8
Speculative GraphQL metrics for your Postgres databases.
Stars: ✭ 73 (+114.71%)
Mutual labels:  redis-cache
tag-cache
Tagged Cache implementation over redis
Stars: ✭ 16 (-52.94%)
Mutual labels:  redis-cache
CleanArchitecture-Template
This is a solution template for Clean Architecture and CQRS implementation with ASP.NET Core.
Stars: ✭ 60 (+76.47%)
Mutual labels:  redis-cache
rueidis
A Fast Golang Redis RESP3 client that supports Client Side Caching, Auto Pipelining, Generics OM, RedisJSON, RedisBloom, RediSearch, RedisAI, RedisGears, etc.
Stars: ✭ 422 (+1141.18%)
Mutual labels:  redis-cache
cache
🗃 Generic cache use and cache manage. Provide a unified usage API by packaging various commonly used drivers. Support File, Memory, Redis, Memcached and more. Go 通用的缓存使用库,通过包装各种常用的驱动,来提供统一的使用API,便于使用。
Stars: ✭ 146 (+329.41%)
Mutual labels:  redis-cache

guava-cache-redis

Implement guava cache interface backed by redis. Guava provide memory cache implementation. We provide redis cache implementation.

Please read guava caches explained first.

Howto

<dependency>
    <groupId>com.github.levyfan</groupId>
    <artifactId>guava-cache-redis</artifactId>
    <version>0.0.2</version>
</dependency>

From a CacheLoader

RedisCache<Key, Graph> redisCache = new RedisCache<>(
  jedisPool,
  keySerializer,
  valueSerializer,
  keyPrefix,
  expiration,
  new CacheLoader<Key, Graph>() {
    public Graph load(Key key) throws AnyException {
      return createExpensiveGraph(key);
    }
  }
);
...

try {
  return redisCache.get(key);
} catch (ExecutionException e) {
  throw new OtherException(e.getCause());
}

From a Callable

RedisCache<Key, Graph> redisCache = new RedisCache<>(
  jedisPool,
  keySerializer,
  valueSerializer,
  keyPrefix,
  expiration
);
...

try {
  // If the key wasn't in the "easy to compute" group, we need to do things the hard way.
  redisCache.get(key, new Callable<Value>() {
    @Override
    public Value call() throws AnyException {
      return doThingsTheHardWay(key);
    }
  });
} catch (ExecutionException e) {
  throw new OtherException(e.getCause());
}
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].