Skip to content
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(chore): allow chained storages #359

Merged
merged 3 commits into from
Aug 21, 2023

Conversation

darkweak
Copy link
Owner

Closes #344

@darkweak darkweak added enhancement New feature or request Next release It will be in the next release labels Aug 19, 2023
@darkweak darkweak self-assigned this Aug 19, 2023
@darkweak darkweak force-pushed the feat/chore/storages/allow-chained-storages branch 6 times, most recently from a0db5e7 to 5dd9f39 Compare August 19, 2023 23:51
@darkweak darkweak force-pushed the feat/chore/storages/allow-chained-storages branch from 5dd9f39 to c43b4ce Compare August 20, 2023 08:36
@darkweak darkweak force-pushed the feat/chore/storages/allow-chained-storages branch 2 times, most recently from 85bb123 to 0c77dbc Compare August 21, 2023 07:24
@darkweak darkweak force-pushed the feat/chore/storages/allow-chained-storages branch from 0c77dbc to 9d6a540 Compare August 21, 2023 08:43
@darkweak darkweak merged commit fc90452 into master Aug 21, 2023
20 of 21 checks passed
@wchargin
Copy link

wchargin commented Oct 29, 2023

This is a breaking change released in a patch version. For instance, it
breaks caddyserver/cache-handler:

./configuration.go:160:9: cannot use c.DefaultCache (variable of type *DefaultCache) as configurationtypes.DefaultCacheInterface value in return statement: *DefaultCache does not implement configurationtypes.DefaultCacheInterface (missing method GetStorers)
./httpcache.go:240:35: s.SouinBaseHandler.Storer undefined (type *middleware.SouinBaseHandler has no field or method Storer)
./httpcache.go:264:25: s.SouinBaseHandler.Storer undefined (type *middleware.SouinBaseHandler has no field or method Storer)
./httpcache.go:274:35: s.SouinBaseHandler.Storer undefined (type *middleware.SouinBaseHandler has no field or method Storer)

Is there at least a migration guide?

@darkweak
Copy link
Owner Author

Hello @wchargin That's an internal behavior that doesn't affect end users, previous configurations are totally compatible with this change.

@wchargin
Copy link

wchargin commented Oct 30, 2023

I don't follow?

My understanding is that DefaultCacheInterface is a public type
exported by the github.com/darkweak/souin/configurationtypes package.
For instance, it's listed on pkg.go.dev. And this pull request
adds a new method to that interface.

Doesn't that constitute a breaking API change for end users of the
github.com/darkweak/souin Go module who have defined custom types that
were intended to implement this interface but no longer do? If it were
backward-compatible, I'd expect to be able to update from previous
releases of souin to this one without error, but, as you can see, that
is not what happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Next release It will be in the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fallback to a different cache system (local => distributed)
2 participants