zoukankan      html  css  js  c++  java
  • 二级缓存插件

    二级缓存插件(都有相应的jar包)有:

    EhCache:属于后台缓存技术    比较常用   

    OSCache:属于页面缓存技术    比较常用

    SwarmCache

    IBossCache

    使用二级缓存插件都要导入相应的jar包后才能使用

    ehcache 是缓存小框架 是hibernate采用的默认缓存技术 存取数据 高效   ehcache 是为了重复读取数据 而提供的支持  ehcache 能装各种数据

    hibernate缓存又分为一级缓存和二级缓存    二级缓存(SessionFactory:一般情况下:一个SessionFactory对应一个数据库)

    开启二级缓存有二种方法:

    1.注解:类上加@cache

    2.配置:<cache  />  在核心配置文件内copy  hibernate.properties 内对应内容 比如:

    <?xml version="1.0" encoding="UTF-8"?>
    <ehcache>
      <!-- ehcache 是 缓存工具。 为了重复读取数据 提供支持 ,默认的hibernate的缓存技术.ehcache 能装各种数据-->
      <diskStore path="D:/aaa"/>
      <cache
        name="myCache"
        maxElementsInMemory="2"
        eternal="false"
        timeToIdleSeconds="120"
        timeToLiveSeconds="120"
        overflowToDisk="true"
        diskPersistent="false"
        diskExpiryThreadIntervalSeconds="120"
        memoryStoreEvictionPolicy="LFU"
      />
      <defaultCache
        maxElementsInMemory="10000"
        eternal="false"
        timeToIdleSeconds="120"
        timeToLiveSeconds="120"
        overflowToDisk="true"
        diskPersistent="false"
        diskExpiryThreadIntervalSeconds="120"
        memoryStoreEvictionPolicy="LRU"
        />
    </ehcache>

  • 相关阅读:
    vscode常用插件列表
    使用docker构建supervisor全步骤
    docker删除虚悬镜像(临时镜像文件)
    消息队列的对比
    ECharts使用:this.dom.getContext is not a function
    curl命令行请求
    工作工具清单
    《SQL优化入门》讲座总结
    初始化git库并配置自动部署
    php代码进行跨域请求处理
  • 原文地址:https://www.cnblogs.com/hwgok/p/5393861.html
Copyright © 2011-2022 走看看