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 6715507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:37:22+00:00 2026-05-26T08:37:22+00:00

I have a view which returns a list of large Mongo Documents via an

  • 0

I have a view which returns a list of large Mongo Documents via an ORM (MongoEngine). The ORM query against the Collection varies on a number of levels (ordering, limit, offset, query filters, etc). However, the underlying data is not updated regularly.

To display the data, the view converts the Mongo Documents into Pythonic Dict objects.

For caching purposes, should I just call the built-in hash() function against the MongoEngine ORM method? In other words:

key = hash('Document.objects.filter(user_id__gt=5)')
value = Document.objects.filter(user_id__gt=5)

I would then use the Django caching API with a memcache backend.

This does not seem threadsafe but I’m not sure that’s a huge consideration. My bigger worry is the overhead of reading from/writing to Memcache for every query variation. I suppose I could just limit it to the most common queries.

I guess the biggest question is whether Mongo requires memcache at all for this sort of lower level functionality.

  • 1 1 Answer
  • 0 Views
  • 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-26T08:37:22+00:00Added an answer on May 26, 2026 at 8:37 am

    MongoDB uses memory mapped files and the underlying OS handles paging to/from disk vs. keeping data in memory as efficiently as it can. If you have extra RAM, use it for MongoDB to maximize your throughput and decrease your code complexity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list view which is populated via records from the database. Now
I have a function in view.py which returns two variables i.e. a dictionary named
Hi guys i have controller which returns a partial view, the controller is called
I have created two options for a query used in a view which return
I have a list view control which at the moment only allows one item
I have an Action which returns a partial view, and I would like to
i have view controller which contains a button which show the image library ,if
I have a view which contains a form, the form posts and the data
I have a view which is composed of top, left and bottom headers and
I have a view which was working fine when I was joining my main

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.