-
Notifications
You must be signed in to change notification settings - Fork 754
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
Fix outputcache FileProvider invalid datetime culture format #4915
Conversation
Release/9.7.1
Updates versions as per release candidate creation
Release/9.7.2
Release/9.8.0
Merging into master to release v9.8.1
Merges release/9.9.0 into master in order to release
Merging into master to release v9.9.1
Merging Release/9.10.0 into master to release v9.10.0
Merged Release/9.10.1 into master to release v9.10.1
Release/9.10.2
Can you clarify what issue you're seeing, how to reproduce and validate that this fixes the issue? It looks like there are maybe two or three different fixes in this PR, is that right? |
DateTime.UtcNow.Add(duration).ToString() sometimes return localized date style like "2021-11-21 9:44:90 CH".
|
In addition, during debugging, I encountered an annoying situation when both the cache files of the Module and Page were in the same Cache\Pages folder, which was very difficult to distinguish. I've put together a PR that separates the Module's Cache folder into a separate folder called Cache\Modules, hoping for approval.
|
No, just because PR1 I forgot to delete some meaningless variables I added for debugging so I don't know how to recover so I push PR2 again. Variables I added but forgot to remove: Dnn.Platform/DNN Platform/Library/Services/OutputCache/Providers/FileProvider.cs Lines 175 to 180 in 1808727
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
I've built and tested on the actual running environment, it runs very well, it's faster Lines 49 to 61 in 9f83285
I fixed on my production site BEGIN
IF NOT EXISTS (SELECT CacheKey from dbo.OutputCache where CacheKey = @CacheKey)
begin
INSERT INTO dbo.OutputCache
(ItemId,
CacheKey,
Data,
Expiration
) VALUES
(@ItemId,
@CacheKey,
@Data,
@Expiration
)
end
ELSE UPDATE dbo.OutputCache Set Data = @Data, Expiration = @Expiration Where CacheKey = @CacheKey
END @bdukes I do not know should pull this PR? and where to fix? |
Yes, a PR for that would be welcome. You'd need to introduce a new SQL file, Also, I've updated this PR to target the Thanks! |
I suggest using a SQL merge statement instead for better performance |
If adding the SQL fix I believe that the structure outlined by @thienvc is appropriate, per the following guidance from Microsoft.
This was obtained from the official MERGE Documentation |
I'm not very good with Github but let me try |
Thanks @sleupold @mitchelsellers I haven't used Merge, so not sure about performance, someone who has tested Profiler and has more experience can give me some advice |
@mitchelsellers I think that's talking about syncing between two tables, where the source of the data being inserted into the table is another query. I don't think that applies here. The first example in that documentation matches what we're trying to do here. It also reduces the possibility for a concurrency race to use |
Oh, after 2 years it seems this error is back |
@thienvc I would recommend creating a new issue with steps to reproduce referencing this PR. |
Fix outputcache FileProvider invalid datetime culture format