Polly icon indicating copy to clipboard operation
Polly copied to clipboard

New cache policy syntax

Open eugbaranov opened this issue 6 years ago • 2 comments

I've been experimenting with a new syntax for cache policies.

@reisenberger is that what you had in mind or something more radical?

eugbaranov avatar Feb 14 '20 08:02 eugbaranov

Thanks @eugbaranov , I'll take a look!

reisenberger avatar Feb 14 '20 18:02 reisenberger

@eugbaranov Thanks for sharing this! :+1: The plan for Polly v8 syntax is indeed quite like that (introduction of XOptions or XConfiguration class), but one step more: a policy would be configured by passing in an Action<XConfiguration>, as shown in this early sketch; a fluent builder style.

This syntax style has already been implemented for Simmy, by @vany0114 and myself. You can see the exact changes from old-style syntax, in this commit. Usage is as shown in the Simmy ReadMe.

Hoping to publish a more formal proposal and embark this work in the next 4 weeks (depending other commitments). Once we are underway, contributions to converting the policies over would be very welcome!

reisenberger avatar Feb 15 '20 15:02 reisenberger

Closing due to inactivity.

Please open a new pull request if you would like to continue with a proposal for this change which we could consider for a v8 of Polly.

martincostello avatar Dec 16 '22 15:12 martincostello