Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong absolute expiration is used #31

Closed
swcarter007 opened this issue Jul 17, 2017 · 5 comments
Closed

Wrong absolute expiration is used #31

swcarter007 opened this issue Jul 17, 2017 · 5 comments

Comments

@swcarter007
Copy link

The utcAbsoluteExpiration variable is not used in the method overloading on line 422.

///
/// Inserts an object into the System.Web.Caching.Cache that has file or key dependencies and
/// expires at the value set in the parameter.
///
public void Insert(string key, object value, CacheDependency dependencies, DateTime absoluteExpiration, TimeSpan slidingExpiration) {
DateTime utcAbsoluteExpiration = DateTimeUtil.ConvertToUniversalTime(absoluteExpiration);
ObjectCache.Insert(key, value, new CacheInsertOptions() {
Dependencies = dependencies,
AbsoluteExpiration = absoluteExpiration,
SlidingExpiration = slidingExpiration
});
}

@klabranche
Copy link

klabranche commented Aug 16, 2017

I can confirm this is happening to me on two of my three developer machines using this Cache.Insert signature taking these four parameters (System.Web.Caching.Cache).

What framework update did this go out with? The code in question hasn't been touched in years and in passing in DateTime.Now + two hours. We change it the DateTime.UtcNow and it works again OR if we manually add 9 hours to our DateTime.Now calc (7 for UTC)....

On several other developer machines this hasn't happened yet and on zero servers.... Figure it's an update to the framework via Visual studio update perhaps?

@klabranche
Copy link

This appears to have been in the framework for a long time as is..... Not sure why it's now manifesting on some machines here and not others with the code we wrote for cache.insert not being changed itself since 2015..... Must be something interrelated with a machine change....

@akoeplinger
Copy link
Member

akoeplinger commented Aug 16, 2017

This is not the right repository to file issues about the bug, the referencesource repo is read-only.

@terrajobst can you please advise about where such issues should be filed? I think we should also add issue and pull request templates here which explain the distinction. LOL, seems this is already there now :)

@terrajobst
Copy link
Member

terrajobst commented Aug 16, 2017

@swcarter007

I suggest you file the issue in aspnet/home repository. We only track reference source infrastructure issues here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants