Skip to content

Support for never expire cache items when expiration time is null #88

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

Merged
merged 7 commits into from
Jul 21, 2025

Conversation

dev-hancock
Copy link

Updated

  • SQLCommands now support operations when ExpiresAtTime is NULL
  • ItemFull model updated to use a nullable ExpiresAtTime
  • PostgreSqlCacheOptions now exposes a nullable DefaultSlidingExpiration, allowing you to override the default ExpiresAtTime behaviour
  • PostgreSqlCache respects nullable ExpiresAtTime, and the ValidationOptions method has been removed

@dev-hancock
Copy link
Author

PR for #64

@dev-hancock
Copy link
Author

Reviewed the existing tests and noticed a number of tests that look auto-generated (likely by an AI tool?) but don’t add meaningful coverage.

Would you be open to carving out a subset of high-value tests and removing or refactoring the rest?

Happy to discuss which tests you think are most valuable and help with the cleanup!

Thanks for considering

@leonibr
Copy link
Owner

leonibr commented Jul 21, 2025

Thanks for the feedback!

Just a heads-up: I’ve been working on a new feature (see #92), which targets the next branch. The tests in that branch have started to been cleaned up and are more streamlined. I just pushed what I had so far but the feature itself it is still in progress and I just committed what is working.
The branch you’re is based on master, which still has some legacy (and auto-generated) tests.

Would it make sense for you to retarget your PR to the next branch instead? That way, you’ll see the updated tests, and we can avoid redundant cleanup.

Let me know what you think, and happy to help coordinate!

Thanks again!

@dev-hancock dev-hancock changed the base branch from master to next July 21, 2025 16:04
# Conflicts:
#	CachingTest/DatabaseOperationsAdditionalTests.cs
#	CachingTest/ExpirationEdgeCaseTests.cs
#	Extensions.Caching.PostgreSql/DatabaseOperations.cs
@dev-hancock
Copy link
Author

This is now rebased onto next, I’ve sorted out the merge conflicts, and the tests are passing. Please take a look and let me know if anything else needs tweaking!

@leonibr leonibr merged commit 4774da9 into leonibr:next Jul 21, 2025
1 check passed
@leonibr
Copy link
Owner

leonibr commented Jul 21, 2025

Thank you @dev-hancock , I really appreciate it

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.

2 participants