V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
DAOCLOUD
推荐学习书目
Python Cookbook
Using Google App Engine
推荐下载
Latest Google App Engine SDK
其他兼容技术
AppScale
darcy

使用与不使用memcache的差别

  •  
  •   darcy · Apr 14, 2011 · 4943 views
    This topic created in 5506 days ago, the information mentioned may be changed or developed.
    6 replies    1970-01-01 08:00:00 +08:00
    Livid
        1
    Livid  
    MOD
    PRO
       Apr 14, 2011
    具体的代码是?
    upsuper
        2
    upsuper  
       Apr 14, 2011
    其实挺正常的……毕竟查询数据库需要消耗大量的cpu时间,特别是对于gae的那种分布式数据库来说……
    darcy
        3
    darcy  
    OP
       Apr 14, 2011
    upsuper
        4
    upsuper  
       Apr 14, 2011
    @darcy 你可以用get_multi和set_multi获得更好的性能理论上,当然这里次数少无所谓……
    darcy
        5
    darcy  
    OP
       Apr 14, 2011
    @upsuper 嗯,thx
    X-Force
        6
    X-Force  
       Apr 14, 2011
    那是肯定的。我的网站的页面计数就是用memcache,如果不小心停掉它,服务器瞬间CPU和内存爆满
    http://www.iplaysoft.com
    http://www.ipc.me
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3350 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 12:45 · PVG 20:45 · LAX 05:45 · JFK 08:45
    ♥ Do have faith in what you're doing.