Skip to content

Introduce response based cache expiry#15

Open
kevinmade wants to merge 3 commits intosaloonphp:v3from
kevinmade:feature/resolve-cache-expiry
Open

Introduce response based cache expiry#15
kevinmade wants to merge 3 commits intosaloonphp:v3from
kevinmade:feature/resolve-cache-expiry

Conversation

@kevinmade
Copy link

No description provided.

Copy link

@JonPurvis JonPurvis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great implementation!

I had one question regarding resolveCacheExpiry() which I've commented in the file.

Other than that, could you add some tests that:

  • Cover DateTimeImmutable being returned
  • Assert the cached entry is written with the correct expiry
  • Any edge cases in resolveCacheExpiry such as 0, negative, date in the past

Thanks!

@kevinmade kevinmade requested a review from JonPurvis March 4, 2026 08:05
@JonPurvis
Copy link

Thanks for taking a look at my feedback, I'll get round to giving this a look over later this week / early next week. If it's all good, we can get it merged and get a new release out!

Copy link

@JonPurvis JonPurvis left a 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.

I'll speak with @Sammyjo20 next week (if not before) to see if he's happy to get this merged and arrange a release of this package!

Thanks for your work on this!

@Sammyjo20
Copy link
Member

The PR looks good to me but it still looks like it would be a breaking change because we're completely removing the cacheExpiryInSeconds method and changing it to resolveCacheExpiry which no one would have implemented, so updating the package would break it for their existing implementations.

@JonPurvis
Copy link

Hey @Sammyjo20

We could perhaps release this as v4? We'd need a short upgrade guide somewhere though!

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.

3 participants