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

MetadataService/DistributedCacheMetadataService IDistributedCache dependency limitations #397

Open
Simonl9l opened this issue Jun 5, 2023 · 1 comment
Milestone

Comments

@Simonl9l
Copy link

Simonl9l commented Jun 5, 2023

Great well written and (for the most part) easy to use library - thanks!

The DistributedCacheMetadataService leverages both IMemoryCache and IDistributedCache. However it makes assumptions on how much data can be stored in any givrn Distributed Cache Implementation.

In the case of using say this AWS implementation that uses DynamoDB as its backing store. Here the max size that can be persisted is 65535 bytes. It seems that the Metadata blob is larger than this and fails.

In this case it's a physical limitation of the DynamoDB that can not be overcome. Arguably the AWS IDistributedCache implementation should perhaps handle it (with perhaps multiple entries), but there is a chain of assumptions here that might lead to opinionated code.

Whilst it would be good to get a solution to this, in the meantime per the docs in this area it is not clear if there is an alternative to not using using the DistributedCacheMetadataService as defined by .AddCachedMetadataService and be just reliant on the local file system to cache the metadata file?

It seem that AddFileSystemMetadataRepository can only be using with the context of the .AddCachedMetadataService to configure it but this then brings in the DistributedCacheMetadataService that in turn brings in the IMemoryCache and more specifically the IDistributedCache that is otherwise used for session management that can be used easily within the 65535 byte limitation it has.

@abergs
Copy link
Collaborator

abergs commented Oct 29, 2024

@Simonl9l Sorry for the long wait, we're looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants