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

  • Home
  • SEARCH
  • 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 8436235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:07:38+00:00 2026-06-10T07:07:38+00:00

We currently use NGINX as our server, we use memcache to cache db queries

  • 0

We currently use NGINX as our server, we use memcache to cache db queries as well as pages in php.

We have a version numbering system where in any update or insert happens this version number is bumped up, as a result memcache will always fetch new data as each key is appended with this version number. It works for us as read write % split is at 80/20 % so most of the times memcache is going to return the data without hitting the DB.

Now we plan to move this caching strategy to the server level where NGINX along with the memcache module will cache GET requests using the request uri along with the version number.

Just needed some feedback on how i can achieve this

  • Can i fetch this version number which is stored in memcache in NGINX? (this will be used to append it to the request uri)
  • How do i handle logged in users? (can I just set a cookie for a logged in user and check if this cookie exists in nginx if it does just pass the request to backend instead of memcache)
  • 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-06-10T07:07:40+00:00Added an answer on June 10, 2026 at 7:07 am

    1) unfortunately you can’t do this with “vanila” nginx. but there are a couple of 3rd-party nginx modules witch can help you implement that. please take a look at

    Enhancement memcached protocol support
    https://github.com/bpaquet/ngx_http_enhanced_memcached_module
    http://wiki.nginx.org/NginxHttpMemcModule

    Value evaluation
    https://github.com/vkholodkov/nginx-eval-module

    I would like to recommend you give a chance to github.com/agentzh/ngx_openresty (nginx with many patches and modules)
    Great presentation about NGINX scripting agentzh.org/misc/slides/nginx-conf-scripting/nginx-conf-scripting.html

    2) There are a lot of examples over internet how disable caching for logging user

        if ($http_cookie ~* "auth_user") {
            # do some thing, set flag or so  
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I have a home server (Ubuntu) with nginx running where I use proxy
We currently use LoadRunner for performance testing our web apps, but we also have
I currently have one server with nginx that reverse_proxy to apache (same server) for
I currently use Zend_Db to manage my queries $stmt = $db->prepare(INSERT INTO test (ID_Test)
I currently use Berkeley DBs fronted by a Java server for a high-performance disk-backed
I currently use a System.IO.FileSystemWatcher as part of a roll your own message queue
I currently use, base64_encode() to encode a user's password, this works well because it
I currently have an ageing subversion 1.4.2 server with multiple repos that I want
I currently upload to a webservice on an nginx server using the upload module
I'm running a website with a nginx server with PHP Fastcgi on a VPS.

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.