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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:45:40+00:00 2026-05-27T22:45:40+00:00

I want a thing in caching that a collection variable that can access from

  • 0

I want a thing in caching that a collection variable that can access from anywhere in my application.

i can put data in collection and access them after anywhere in application. the data lost after a time who i set to expiry of data.

someone can show me some code in c# to do this well.

  • 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-27T22:45:41+00:00Added an answer on May 27, 2026 at 10:45 pm

    You might want to check out ASP.Net Caching. It allows you to have an application wide caching store (key value collection) which exists as long as your application pool is running.
    Also it support expiration of inserted items.

    Cache.Insert("CacheItem6", "Cached Item 6",
        null, DateTime.Now.AddMinutes(1d), 
        System.Web.Caching.Cache.NoSlidingExpiration);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble with caching URLResponses to disk. I want that because the data
First thing i want to say that it's not an easy question to explain,
I'm writing a plugin that's modifying an existing UI. One thing I want to
I want to create a tab/widget/thingymajiggy like the feedback-thing in this picture: That behaves
I've written my own caching layer for my objects that come out of data
I'm writing a database access app for storing some data and want to ask
I am facing a problem with .NET generics. The thing I want to do
I have one line of code which seems commented. Basically the thing I want
I want to use some thing unique for a licensing system. i decided to
I want to parse a config file sorta thing, like so: [KEY:Value] [SUBKEY:SubValue] Now

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.