内存缓存解决方案 cache2k

码农软件 · 软件分类 · 缓存系统 · 2019-08-30 09:56:56

软件介绍

cache2k 是个成熟的性能优越的内存缓存解决方案。

Maven:

<properties>
  <cache2k-version>1.0.2.Final</cache2k-version>
</properties>

<dependencies>
  <dependency>
    <groupId>org.cache2k</groupId>
    <artifactId>cache2k-api</artifactId>
    <version>${cache2k-version}</version>
    <scope>provided</scope>
  </dependency>
  <dependency>
    <groupId>org.cache2k</groupId>
    <artifactId>cache2k-all</artifactId>
    <version>${cache2k-version}</version>
    <scope>runtime</scope>
  </dependency>
</dependencies>

示例代码:

Cache<String, String> cache = new Cache2kBuilder<String, String>() {}
  .name("routeToAirline")
  .eternal(true)
  .entryCapacity(100)
  .build();
// populate with our favorites
cache.put("MUC-SFO", "Yeti Jet");
cache.put("SFO-LHR", "Quality Air");
cache.put("LHR-SYD", "Grashopper Lifting");
// query the cache
String route = "LHR-MUC";
if (cache.containsKey(route)) {
  System.out.println("We have a favorite airline for the route " + route);
} else {
  System.out.println("We don't have a favorite airline for the route " + route);
}
String airline = cache.peek(route);
if (airline != null) {
  System.out.println("Let's go with " + airline);
} else {
  System.out.println("You need to find one yourself");
}

本文地址:https://codercto.com/soft/d/13484.html

C语言接口与实现

C语言接口与实现

David R. Hanson / 郭旭 / 人民邮电出版社 / 2011-9 / 75.00元

《C语言接口与实现:创建可重用软件的技术》概念清晰、实例详尽,是一本有关设计、实现和有效使用C语言库函数,掌握创建可重用C语言软件模块技术的参考指南。书中提供了大量实例,重在阐述如何用一种与语言无关的方法将接口设计实现独立出来,从而用一种基于接口的设计途径创建可重用的API。 《C语言接口与实现:创建可重用软件的技术》是所有C语言程序员不可多得的好书,也是所有希望掌握可重用软件模块技术的人员......一起来看看 《C语言接口与实现》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具