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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:42:42+00:00 2026-06-13T03:42:42+00:00

First, my purpose is when the user close the browser then the user session

  • 0

First, my purpose is when the user close the browser then the user session data should expire. Now the problem is that, my Server requires memcached to work properly. So, I want to delete that specific user session from memcached who has closed his browser. I dont want to clear all memcached so that the remaining users’ session should still exist.

  • 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-13T03:42:44+00:00Added an answer on June 13, 2026 at 3:42 am

    In Memcached there is no way to list all keys in a specific namespace unless you want to use some workarounds, and I don’t recommend you in production.

    One alternative would be to store all user-related Memcached keys in a set (stored in memcached as well). The set key is generated using the user id, so that you always know in advance its value and you can easily retrieve it.

    Once the user session ends, you can fetch the item containing the list of user keys, then delete each key. Keep in mind that the key containing the list of keys should have an expiration greater than any item-specific item.

    It is also worth mentioning that Redis supports key iteration and sets by default, and you can configure it to work like Memcached. You may want to give it a try.

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

Sidebar

Related Questions

First, context: I'm trying to create a command-line-based tool (Linux) that requires login. Accounts
first off I'm a noob to PHP but here is my problem. I am
First i selected images from photo library to ALAsset Library and after that i
First you should know I have looked into many questions and none of them
I'm trying to extract the first user-right from semicolon separated string which matches a
I've got a DataGrid whose main purpose is to allow the user to enter
I have two queries serving the same purpose. SELECT * FROM #user INNER JOIN
I am working on my first Fb App. Just for testing purpose I went
First off, I'm aware that there are many questions related to this, but none
I've made a user interface that contains several text fields. When the app launches,

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.