Skip to content

Add time.Duration support for cache expiration (Issue #104)#146

Open
DARSHANR007 wants to merge 1 commit intocoocood:masterfrom
DARSHANR007:feature/duration-support
Open

Add time.Duration support for cache expiration (Issue #104)#146
DARSHANR007 wants to merge 1 commit intocoocood:masterfrom
DARSHANR007:feature/duration-support

Conversation

@DARSHANR007
Copy link
Copy Markdown

Implements time.Duration as a first-class API for cache expiration settings.

Changes:

  • Added 5 new Duration-based methods: SetDuration(), TouchDuration(), GetOrSetDuration(), SetAndGetDuration(), UpdateDuration()
  • Added UpdaterDuration callback type
  • Marked old int-based methods as Deprecated (they now delegate to Duration methods)
  • Comprehensive unit tests for all new methods
  • All 41 tests pass, full backward compatibility maintained

Closes #104

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

Successfully merging this pull request may close these issues.

Set support time.Duration as expire data type

1 participant