dongtan8532 2017-07-04 16:48 采纳率: 0%
浏览 42

查询memcached以获取关键数据的一部分

Working on a caching modal for a small project i am working on. I've implemented memcached for the cache technology.

I am trying to save roughly around 750kb of data in a formatted array in a single key. the problem is, on each request, i only need 5% of the data, so getting all the data in a single call is a waste of network resources. I know i can create multiple keys with specific data set but i am trying to minimize the number of connections to the memcached server.

Question is. is there a way i can query memcached to just get part of the key value?

  • 写回答

1条回答 默认 最新

  • duandu1377 2017-07-05 12:37
    关注

    Typically how you divide your data in one key or multiple keys it is depends on use case.

    But as you mentioned you required only 5% of data, then it will be good you divide your data into multiple keys. Memcache connects time and network latency you can reduce by using local Memcache.

    local Memcache means Memcache will be on the same machine where your web server and each web server has its own small instance of Memcache locally. It will reduce to network latency. Because all communication has done at 127.0.0.1 (locally)

    At that information required shared across the web server like session, you can keep it Global Memcache. it will improve you website scalability and at the same time cache segregation.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog