Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 634871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:20:34+00:00 2026-05-13T20:20:34+00:00

Lets suppose that we have some kind of items and these items could be

  • 0

Lets suppose that we have some kind of items and these items could be rated by users. Should I store item rating and item data in different memcache keys?

Logically, we should keep rating out of main item data, because item data changes very rarely, but rating changes more often. When somebody rates the item I should invalidate only item rating key, but not whole item.

Why I’m asking this question? For example, I have 100 items per page….

  1. I’m getting item ids for this page = 1 memcache “query”
  2. I’m getting item data for each item id on page = 100 memcache “queries”
  3. I’m getting item rating for each item id on page = 100 memcache “queries”

Total : 201 memcache “queries”

Storing item rating together with main item data in one key we will get only 101 memcache “queries”.

So, what is the best practice? I’m really worried about number of memcache “queries” per page. Or I shouldn’t worry about it?

Thank you.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:20:34+00:00Added an answer on May 13, 2026 at 8:20 pm

    Memcache allows to put array of keys to get() method.

    (Russia language) http://highload.com.ua/index.php/2009/08/05/memcache-multi-get-%D0%B7%D0%B0%D1%87%D0%B5%D0%BC/

    Fetched 15000 objects with standard get in 0.47441411018372s - using get
    Fetched 15000 objects with multiple get in 0.023789882659912s - using multi get
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets suppose that I have some pages some.web/articles/details/5 some.web/users/info/bob some.web/foo/bar/7 that can call a
Let's suppose I have created a view that shows some kind of stories. But
I have a 2D array. Lets suppose that it has some connected region which
Lets suppose that I have the following simple query var q = from p
Lets suppose that I have a Category table with a column that holds the
I have some kind of an ideological question, so: Suppose I have some templated
Lets suppose I have an .NET client application that connects to a WCF service,
I am writing Plugin for some Application. Lets suppose that Application hava library dependency
Lets suppose we have some XML like so: <a> <b> <c>text</c> <d> <e>text</e> <f>
Suppose that I have a cell, lets say Sheet2.A1 , with the value: Sheet1.A10

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.