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

Default Cache should not be file based #25

Open
ManfredLange opened this issue May 8, 2017 · 2 comments
Open

Default Cache should not be file based #25

ManfredLange opened this issue May 8, 2017 · 2 comments

Comments

@ManfredLange
Copy link

ManfredLange commented May 8, 2017

At present if the cacheDirectory parameter of the AzureDirectory constructor is null, AzureDirectory will default to creating a folder in the local file system.

While this may be fine for local development and for some deployment scenarios, it doesn't work if you deploy as an app service to Azure. You don't necessarily have write permissions.

I'd like to suggest that the default could be RAMDirectory() instead. Alternatively, AzureDirectory should not make an assumption that write permission exists for the local file system. Instead AzureDirectory should require the explicit specification of a cache directory object.

In our case we experienced a short downtime in one of our production deployments that would have been avoidable. We resolved it by passing "new RAMDirectory()" as the value for parameter cacheDirectory to the constructor of AzureDirectory().

@richorama
Copy link
Member

Sorry to hear about your downtime.

What do you think about not having a default, and forcing the developer to choose?

@ManfredLange
Copy link
Author

Yes, I think that would be an improvement. If you choose that option perhaps it might make sense to review the intro page here on Github as well as the example code. Just a thought.

An additional option would be to suggest using path "d:\home\site" for the location of the cache directory. This is a faux directory that is available to app services on Azure (for details see https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-available-operating-system-functionality). A SimpleFSDirectory at d:\home\site is also the option we went with in the end as it turned out that the RAMDirectory() was running into OutOfMemoryExceptions very quickly.

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