zoukankan      html  css  js  c++  java
  • [Web] Possible bug for Cache the network request

    The racing condition would be one possible bug when we apply cache a newtwork request.

    For example, we implement a search box, for all the requests, we apply caches.

    When we have a cache ready, for example, we search for word:

    start

    then issue a new request:

    start w

    before data coming back, we restore to previous search:

    start

    It may happens that the search result for "start w" will override the cache result.

    To solve this problem, we need to apply "Aborting logic".

  • 相关阅读:
    触发器
    dubbox 及 zookeeper的安装与启动
    负载均衡
    SOA架构
    获取短信验证码
    分步式
    saoruo
    Ngx
    redies技术
    Springboot开发特点
  • 原文地址:https://www.cnblogs.com/Answer1215/p/14109154.html
Copyright © 2011-2022 走看看