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

[BUG] NullFusionCache throws when setupAction is used #168

Closed
kelko opened this issue Aug 21, 2023 · 5 comments
Closed

[BUG] NullFusionCache throws when setupAction is used #168

kelko opened this issue Aug 21, 2023 · 5 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kelko
Copy link

kelko commented Aug 21, 2023

Describe the bug

NullFusionCache.CreateEntryOptions throws "NotImplementedException"

To Reproduce

// variant 1
var cache1 = new NullFusionCache(new FusionCacheOptions());
var result1 = await cache1.GetOrSetAsync<bool>(
    "some-name",
    (ctx, ct) => Task.FromResult(true),
    options => options.SetDuration(TimeSpan.FromSeconds(1)));

// variant 2
var cache2 = new NullFusionCache(new FusionCacheOptions());
var result2 = await cache2.GetOrSetAsync<bool>(
    "some-name",
    ct => Task.FromResult(true),
    options => options.SetDuration(TimeSpan.FromSeconds(1)));

Expected behavior

GetOrSetAsync with provided setupAction passes the result from factory through the same way the version without setupAction does.

Versions
FusionCache: 0.23.0
.NET 6

@jodydonetti
Copy link
Collaborator

Hi @kelko , the thing is:

image

So yeah, what can I say? I'm dumb 😅

Sorry about that, I'll fix it in the next release.

@jodydonetti jodydonetti self-assigned this Aug 21, 2023
@jodydonetti jodydonetti added the bug Something isn't working label Aug 21, 2023
@jodydonetti jodydonetti added this to the v0.24.0 milestone Aug 21, 2023
jodydonetti added a commit that referenced this issue Sep 3, 2023
@jodydonetti
Copy link
Collaborator

Hi all, the v0.24.0-preview1 pre-release is out now on Nuget 🎉

NOTE: remember to check the "include prerelease" checkbox in your IDE to see it!

@jodydonetti
Copy link
Collaborator

Hi @kelko , have you been able to try the new version with the fix?

Thanks!

@kelko
Copy link
Author

kelko commented Sep 14, 2023

Hey @jodydonetti
Sorry for the delay. I checked the preview1 for 0.24.0 and can confirm, that my test now successfully work with the NullFusionCache

@kelko kelko closed this as completed Sep 14, 2023
@jodydonetti
Copy link
Collaborator

Great, thanks!

jodydonetti added a commit that referenced this issue Nov 12, 2023
* Backplane auto-recovery is now Auto-Recovery
* New shared abstract base class
* Better MemoryBackplane
* Xml docs
* Docs
* Better backpressure handling for backplane + tests
* Bug fix for #168
* Add support for inspecting a value being evicted (to support disposability)
* Superior backplane auto-recovery handling, like, new super dooper version, like mega awesome
* Make Simulator fully interactive + add chaos-related functions
* Better backplane tests
* Add support for testing ReThrowBackplaneExceptions when duplicating
* Benchmarks update
* Dependencies update
* Fix links
* Add cancellation support to chaos components
* A lot of internal refactoring
* Add snapshot testing for v0.23.0
* Add distributed cache background execution tests
* Add SetAlwaysDelay(...) overload
* Mega refactoring of the entire distributed management
* General cleanup
* Add Timestamp to AutoRecoveryItem + minor action fix
* Major refactoring, cleanup, speed up and more edge cases handled
* More cleanup
* Add support for splitted background run of background operations (distributed cache vs backplane)
* Better tests
* Small fix
* Cleanup
* Simulator: add random updates
* Add ConnectionMultiplexerFactory to RedisBackplane
* Add EditorBrowsable attribute
* Add ReThrowOriginalExceptions and some specific exceptions for serialization, distributed cache and backplane errors
* Make some of the classes sealed for better perf
* File-scoped namespaces
* Split auto-recovery code into the new AutoRecoveryService
* Better auto-recovery log levels + some refactoring
* Add backplane wire format modifier for
* Simulator stuff
* More sealed stuff
* Better simulator UI
* Small memory optimization
* Add FromByteArray/ToByteArray static methods to BackplaneMessage
* Start using the new native binary serialization methods for BackplaneMessage
* Better logging
* Add v0.23.0 payload samples
* Start using message serialization to better mimic real backplanes
* Add PhysicalExpiration to FusionCacheMemoryEntry
* V0.24.0 metadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants