-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
feat(ICacheEntry): add GetLastAccessed extension method #5219
Conversation
Reviewer's Guide by SourceryThis pull request introduces a new extension method Sequence diagram for cache list and expiration displaysequenceDiagram
participant UI as Cache List UI
participant CL as CacheList Component
participant CE as CacheExpiration Component
participant CM as CacheManager
participant Ext as ICacheEntryExtensions
UI->>CL: View cache list
CL->>CM: Get cache keys
CM-->>CL: Return cache entries
loop For each entry
CL->>CE: Display expiration
CE->>Ext: GetExpiration()
Ext->>Ext: GetLastAccessed()
Ext-->>CE: Return formatted expiration
CE-->>CL: Show expiration info
end
CL-->>UI: Display updated cache list
Class diagram for ICacheEntry extensionsclassDiagram
class ICacheEntry {
<<interface>>
}
class ICacheEntryExtensions {
+GetLastAccessed(ICacheEntry entry, bool force) DateTime?
-PropertyInfo? _lastAccessedProperty
}
class ICacheEntryServerExtensions {
+GetExpiration(ICacheEntry entry) string
+GetSlidingLeftTime(ICacheEntry entry) TimeSpan
}
ICacheEntry <-- ICacheEntryExtensions : extends
ICacheEntry <-- ICacheEntryServerExtensions : extends
note for ICacheEntryExtensions "New extension method to get
the last accessed time"
note for ICacheEntryServerExtensions "Additional extensions for
cache expiration info"
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @ArgoZhang - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5219 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 634 635 +1
Lines 28229 28243 +14
Branches 4063 4066 +3
=========================================
+ Hits 28229 28243 +14 ☔ View full report in Codecov by Sentry. |
add GetLastAccessed extension method
Summary of the changes (Less than 80 chars)
简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号
Description
fixes #5218
Regression?
[If yes, specify the version the behavior has regressed from]
[是否影响老版本]
Risk
[Justify the selection above]
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add an extension method
GetLastAccessed
toICacheEntry
to retrieve the last accessed time of a cache entry. Update the CacheList page to display cache expiration information using the new extension method.New Features:
GetLastAccessed
extension method toICacheEntry
.Tests:
ICacheEntryExtensions
class.