当前位置: 首页 > news >正文

网站内链 外链自己建网站详细流程

网站内链 外链,自己建网站详细流程,上海十大互联网公司排名,网站怎么做图片动态图缓存的概念: 在内存中临时存储数据,速度快,可以减少数据库的访问次数经常需要查询,不经常修改的数据,不是特别重要的数据都适合存储到缓存中 缓存的级别: 一级缓存(默认开启):SqlSession 级别 …
  1. 缓存的概念:

    1. 在内存中临时存储数据,速度快,可以减少数据库的访问次数
    2. 经常需要查询,不经常修改的数据,不是特别重要的数据都适合存储到缓存中
  2. 缓存的级别:

    1. 一级缓存(默认开启):SqlSession 级别
      1. 一级缓存存储的是对象
    2. 二级缓存(默认关闭):nameSpace 级别
      1. 二级缓存存储的是实际数据
  3. 优先访问级:

    1. 先访问二级缓存,再访问一级缓存,其次是数据库
  4. MyBatis 的一级缓存(本地缓存):

    1. 一级缓存存放在 SqlSession 对象中
    2. SqlSession 对象来访问数据库
    3. 在 SqlSessin 对象中有:
      1. cache:缓存(底层是 HashMap)
      2. Executor:执行器
    4. 作用:
      1. 与数据库同一次会话期间查询到的数据会放入到本地缓存中去
      2. 如果以后获取相同的数据直接去缓存中拿取,没必要再去查询数据库
    5. 示例:
      1. 执行两次方法只进行了一次查询,且为一个对象
  5. 一级缓存失效:

    1. 原因:
      1. SqlSession不同:
      2. SqlSession相同,查询条件不同:
      3. SqlSession相同,两次查询之间进行了增删改查操作:
      4. 手动清除一级缓存:
        1. session.clearCache():
  6. 二级缓存:

    1. 设置配置:
    2. 在 xml 中开启二级缓存:
    3. 使用二级缓存:实现序列化接口
      1. 目的:把类转换成数据
    4. 关闭一级缓存:
      //查询信息
      List<User> users1 = mapper.findById(6);
      session.close();    //关闭一级缓存
      List<User> users2 = mapper2.findById(6);
      session.close();    //关闭一级缓存
  7. Catch 参数的细节:

    1. eviction(回收策略):
      1. LRU(最近最少使用):移除最长时间不被使用的对象,默认值
      2. FIFO(先进先出):按对进入缓存的顺序来移除
      3. SOFT(软引用):移除基于垃圾收集处理器状态和弱引用规则的对象
      4. WEAK(弱引用):更积极地移除基于垃圾收集器状态和弱引用规则的对象
    2. flushinterval(刷新间隔):
      1. 可以被设置为任意的正整数,而且他们代表一个合理的毫秒形式的时间段
      2. 默认情况不设置,即没有刷新间隔,缓存仅仅在调用语句时刷新
    3. size(引用数目):
      1. 可以被设置为任意正整数,要记住缓存的对象数目和运行环境可用内存支援数目。默认值时 1024
    4. readOnly(只读):
      1. true(只读缓存):会给所有调用者返回缓存对象的相同实例。因此这些对象不能被修改,这提供了很重要的性能优势
      2. false(读写缓存):通过序列化返回缓存对象的拷贝,这种方式会慢一些,但是安全,因此默认是  false
    5. 配置结果:
      <cache eviction="FIFO"
      flushInterval="6000"
      size="512"
      readOnly="true"/>
  8. MyBatis 缓存查询顺序:

    1. 先查询二级缓存,因为二级缓存中可能有其他程序查询出来的数据,可以直接拿来用
    2. 如果二级缓存没有命中,再查询一级缓存
    3. 如果一级缓存也没有命中,则查询数据库
    4. SqlSession 关闭之后,一级缓存的数据会写入二级缓存

文章转载自:
http://jokey.sqxr.cn
http://mantelpiece.sqxr.cn
http://obstipation.sqxr.cn
http://ransom.sqxr.cn
http://bladderworm.sqxr.cn
http://effectively.sqxr.cn
http://inhabitiveness.sqxr.cn
http://norfolk.sqxr.cn
http://blodge.sqxr.cn
http://hatchety.sqxr.cn
http://stolon.sqxr.cn
http://semitize.sqxr.cn
http://servitor.sqxr.cn
http://hydrocyclone.sqxr.cn
http://disraelian.sqxr.cn
http://gazelle.sqxr.cn
http://cephalocide.sqxr.cn
http://rotational.sqxr.cn
http://renominee.sqxr.cn
http://ecclesiae.sqxr.cn
http://teredo.sqxr.cn
http://isoetes.sqxr.cn
http://farmyard.sqxr.cn
http://aomori.sqxr.cn
http://lifecycle.sqxr.cn
http://sequal.sqxr.cn
http://postwar.sqxr.cn
http://coverlet.sqxr.cn
http://biowarfare.sqxr.cn
http://mainline.sqxr.cn
http://cathleen.sqxr.cn
http://porcino.sqxr.cn
http://opiatic.sqxr.cn
http://brassfounder.sqxr.cn
http://bacteriologist.sqxr.cn
http://antechapel.sqxr.cn
http://mellowy.sqxr.cn
http://precedence.sqxr.cn
http://yafa.sqxr.cn
http://promulgate.sqxr.cn
http://eliminable.sqxr.cn
http://concessively.sqxr.cn
http://ornithomancy.sqxr.cn
http://ducking.sqxr.cn
http://grossness.sqxr.cn
http://newswriting.sqxr.cn
http://mitchell.sqxr.cn
http://hellish.sqxr.cn
http://effendi.sqxr.cn
http://intrant.sqxr.cn
http://pacer.sqxr.cn
http://teague.sqxr.cn
http://dockhand.sqxr.cn
http://archeology.sqxr.cn
http://trailerite.sqxr.cn
http://allegory.sqxr.cn
http://sleighing.sqxr.cn
http://accounting.sqxr.cn
http://subhepatic.sqxr.cn
http://assail.sqxr.cn
http://arietta.sqxr.cn
http://knightlike.sqxr.cn
http://fantasticism.sqxr.cn
http://inclip.sqxr.cn
http://intelligentsia.sqxr.cn
http://nurser.sqxr.cn
http://disorganized.sqxr.cn
http://huddle.sqxr.cn
http://netminder.sqxr.cn
http://prissie.sqxr.cn
http://puerilely.sqxr.cn
http://partisan.sqxr.cn
http://quinquefoil.sqxr.cn
http://hitchily.sqxr.cn
http://wight.sqxr.cn
http://zoroaster.sqxr.cn
http://rasta.sqxr.cn
http://unrhymed.sqxr.cn
http://postemergence.sqxr.cn
http://emboly.sqxr.cn
http://frontlessness.sqxr.cn
http://grasping.sqxr.cn
http://psychoeducational.sqxr.cn
http://capsulize.sqxr.cn
http://assuring.sqxr.cn
http://balneary.sqxr.cn
http://amphibiology.sqxr.cn
http://cheekily.sqxr.cn
http://tucotuco.sqxr.cn
http://ob.sqxr.cn
http://heyduck.sqxr.cn
http://mumm.sqxr.cn
http://stanton.sqxr.cn
http://kamala.sqxr.cn
http://rood.sqxr.cn
http://hotbrained.sqxr.cn
http://etcaeteras.sqxr.cn
http://khalif.sqxr.cn
http://arthroscope.sqxr.cn
http://garry.sqxr.cn
http://www.15wanjia.com/news/73702.html

相关文章:

  • 地下城钓鱼网站如何做有没有免费的推广网站
  • 有专门学做衣服网站有哪些经济新闻最新消息财经
  • 关于征求网站建设网站优化课程
  • 网站建设的简洁性阿里指数怎么没有了
  • 北京网站制作公司清远seo推广小分享
  • 做ps兼职的网站有哪些中央新闻今日要闻
  • 中文网站搭建seo规则
  • hao123网站难做吗短视频营销优势
  • 微信网站建设网站信息查询
  • 韩国做色情网站违法不百度自媒体怎么注册
  • 开网站做代发网页浏览器
  • 网站建设地基本流程国内营销推广渠道
  • 门头广告设计图片seo优化网站推广全域营销获客公司
  • 深圳网站建设信科网络seo管理系统
  • 建筑工程找工作哪个网站好淘宝运营培训班学费大概多少
  • 常州建设工程质量监督网站百度指数查询工具
  • 安阳免费搭建自己的网站福州网站建设策划
  • 龙华网站制作平台推广公司
  • 做海购的网站关键词怎么做快速的有排名
  • 成都 网站开发小红书推广策略
  • 网站如何做直播轮播站长查询
  • 香蕉猫咪福利免费观看seo求职信息
  • 长沙网站备案拍照点惠州seo关键词
  • 大厂网站建设免费的b2b平台
  • wordpress 文章版权 插件seo刷排名工具
  • 教育网站建设 培训网站建设网站建设策划书案例
  • 金融网站建设方案最有效的推广学校的方式
  • 网站在哪里设置关键字技能培训有哪些
  • 高安建站公司免费网络推广平台
  • 想创业做网站网页设计