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

ICache Missing Has and Get #54

Closed
evanrobertson opened this issue Oct 3, 2018 · 6 comments
Closed

ICache Missing Has and Get #54

evanrobertson opened this issue Oct 3, 2018 · 6 comments
Assignees

Comments

@evanrobertson
Copy link

A common pattern for caches are getting values without setting them and also checking if a key exists.

Similar to how Laravel handles them.

I think it would be useful to provide both a Get method and a Has method.

Get<T>(string key);
Has(string key);
@jamesmh
Copy link
Owner

jamesmh commented Oct 3, 2018

Great idea! I'll take a look at the PR hopefully within the next week ;)
I've got a lot of appointments this week 😢

@jamesmh
Copy link
Owner

jamesmh commented Oct 24, 2018

@evanrobertson P.S This is on the todo list - just been super busy with other priorities and "life" in general lol 👍

@tankerkiller125
Copy link

Any update on this? This is super common and in fact the reason I was originally looking to use Coravel, but because it doesn't have the "has" and "get" functions the cache is basically useless to me.

@jamesmh
Copy link
Owner

jamesmh commented Jun 28, 2019

There's a PR that needs to be completed. I can push this into a higher priority among these other things on the list. 👍

@jamesmh
Copy link
Owner

jamesmh commented Aug 29, 2019

Started working on this.

Just FYI, the existing PR is not going to cut it. There are database drivers that exists now which are affected by any changes to the cache interface. So it'll involve releasing a few different nuget packages in order and implementing the changes in the in-memory driver, the SQL server one and the PostGreSQL driver.

@jamesmh
Copy link
Owner

jamesmh commented Aug 29, 2019

Version 3.0.0 has GetAsync and HasAsync

@jamesmh jamesmh closed this as completed Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants