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

MemoryCache missing a Contains function #164

Open
charlenni opened this issue Jan 6, 2022 · 3 comments
Open

MemoryCache missing a Contains function #164

charlenni opened this issue Jan 6, 2022 · 3 comments

Comments

@charlenni
Copy link
Contributor

I'm missing a bool Contains(TileIndex) function for checking, if a given TileIndex is set or not. Or a bool TryGet(key, out T found).

Or did I miss something and could get this information otherwise?

@pauldendulk
Copy link
Contributor

The idea is to use _tileCache.Find() and check for null. It was written more than 10 years ago. Today many apis use the _tileCache.TryGet(key, out T tile) syntax. That would be better. Perhaps it should be added for ease of use.

@pauldendulk
Copy link
Contributor

No plans to implement this in the short term. Perhaps when I do more work on the cache. Closing for now.

@pauldendulk
Copy link
Contributor

Better to keep it open and label as 'enhancement'.

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

2 participants