This pull request introduces a new Clear method to both the WriteHeavyCacheExpired and ReadHeavyCacheExpired cache types and adds corresponding tests to ensure the functionality works as expected. The most important changes include the addition of the Clear method and the implementation of tests for this new method.
New Methods:
cache.go: Added Clear method to WriteHeavyCacheExpired to remove all items from the cache.
cache.go: Added Clear method to ReadHeavyCacheExpired to remove all items from the cache.
Tests:
cache_test.go: Added TestWriteHeavyCacheExpired_Clear to verify that the Clear method correctly removes all items from the WriteHeavyCacheExpired cache.
cache_test.go: Added TestReadHeavyCacheExpired_Clear to verify that the Clear method correctly removes all items from the ReadHeavyCacheExpired cache.
This pull request introduces a new
Clear
method to both theWriteHeavyCacheExpired
andReadHeavyCacheExpired
cache types and adds corresponding tests to ensure the functionality works as expected. The most important changes include the addition of theClear
method and the implementation of tests for this new method.New Methods:
cache.go
: AddedClear
method toWriteHeavyCacheExpired
to remove all items from the cache.cache.go
: AddedClear
method toReadHeavyCacheExpired
to remove all items from the cache.Tests:
cache_test.go
: AddedTestWriteHeavyCacheExpired_Clear
to verify that theClear
method correctly removes all items from theWriteHeavyCacheExpired
cache.cache_test.go
: AddedTestReadHeavyCacheExpired_Clear
to verify that theClear
method correctly removes all items from theReadHeavyCacheExpired
cache.