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

Add ability to configure a namespace/prefix for configured cache storages. #2354

Open
1 task done
mdarrik opened this issue Apr 10, 2024 · 0 comments
Open
1 task done

Comments

@mdarrik
Copy link

mdarrik commented Apr 10, 2024

Describe the feature

Description of the issue

We're working on a Nuxt site using Azure blob storage for the caching layer. We're hitting cache collisions with preview environments since they share the same blob storage container. Since the preview environments are generated on PR, it's not really feasible to give each of them a separate container. It'd be nice to prefix them so they'd be separated by environment.

Proposed feature idea

Alternatives

We could probably use #1048 to do something similar. But this could still be an easier way to have separate caches across multiple deploys or A/B Tests.

Other info

  • I've looked at the cache function in nitro a bit, but can't tell what all would need to be fixed to handle this. I did see that the nitro provided useStorage hook supports using a base as a prefix, but it's not used inside Nitro anywhere. Base is also used in the nitro docs/functions to refer to which storage layer to use, not necessarily to prefix the storage layer.

  • I marked that I'd be willing to submit a PR for this, which is true. My major concerns are around any unintended/easy to miss consequences of this change since the cache handlers are not trivial parts of the Nitro codebase.

Additional information

  • Would you be willing to help implement this feature?
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

1 participant