-
Notifications
You must be signed in to change notification settings - Fork 115
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
EnableDiskCache = false still save to disk #90
Comments
Any chance you correct this @madskristensen ? Also pinged @hellfirehd because I think he was the one who added this fonctionality? |
That looks reasonable. Send a pull request and it will probably get accepted sooner. I’m running off a fork because I think this project is abandoned/dead. |
Alright, I just did that. I hope I did it right Thank you |
Is it possible to approve this merge? |
Can someone please approve this merge ? |
Done |
Is there going to be a new release with this fix... the latest public package still contains the bug. ... or do I need to fork this project coz it's dead |
When I tried to disabled the cache to disk, by adding this to my appsettings.json
"webOptimizer": { "enableDiskCache": false }
the class AssetResponse still try to save it on the disk.
I think the error come from the class AssetBuilder in the function BuildAsync on the line:
await _assetResponseCache.AddAsync(asset.Route, cacheKey, response).ConfigureAwait(false);
I think it should be
if (options.EnableDiskCache == true) { await _assetResponseCache.AddAsync(asset.Route, cacheKey, response).ConfigureAwait(false); }
Any chance you can add this line or correct this bug in an other way?
In my case, the css and js return a 500 error because my user does not have the right to create the folder and the file
Here is the error (I removed the path on my disk)
System.UnauthorizedAccessException: Access to the path '**custom path**' is denied. at System.IO.FileSystem.CreateDirectory(String fullPath) at System.IO.Directory.CreateDirectory(String path) at WebOptimizer.AssetResponseStore.AddAsync(String bucket, String cachekey, AssetResponse assetResponse) at WebOptimizer.AssetBuilder.BuildAsync(IAsset asset, HttpContext context, IWebOptimizerOptions options) at WebOptimizer.AssetMiddleware.HandleAssetAsync(HttpContext context, IAsset asset, WebOptimizerOptions options) at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext]
The text was updated successfully, but these errors were encountered: