Changeset 402 for binary-improvements2/WebServer/src/FileCache
- Timestamp:
- Jan 27, 2023, 7:28:00 PM (22 months ago)
- Location:
- binary-improvements2/WebServer/src/FileCache
- Files:
-
- 1 deleted
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/WebServer/src/FileCache/AbstractCache.cs
r392 r402 1 1 using System.Collections.Generic; 2 2 3 namespace AllocsFixes.FileCache {3 namespace Webserver.FileCache { 4 4 public abstract class AbstractCache { 5 5 public abstract byte[] GetFileContent (string _filename); 6 public abstract (int , int) Invalidate ();6 public abstract (int filesDropped, int bytesDropped) Invalidate (); 7 7 8 8 protected AbstractCache () { … … 16 16 17 17 foreach (AbstractCache cache in caches) { 18 (int , int) returned= cache.Invalidate ();19 filesDropped += returned.Item1;20 bytesDropped += returned.Item2;18 (int files, int bytes) = cache.Invalidate (); 19 filesDropped += files; 20 bytesDropped += bytes; 21 21 } 22 22 -
binary-improvements2/WebServer/src/FileCache/DirectAccess.cs
r392 r402 2 2 using System.IO; 3 3 4 namespace AllocsFixes.FileCache {4 namespace Webserver.FileCache { 5 5 // Not caching at all, simply reading from disk on each request 6 6 public class DirectAccess : AbstractCache { … … 9 9 return File.Exists (_filename) ? File.ReadAllBytes (_filename) : null; 10 10 } catch (Exception e) { 11 Log.Out ( "Error in DirectAccess.GetFileContent: " + e);11 Log.Out ($"Error in DirectAccess.GetFileContent: {e}"); 12 12 } 13 13 -
binary-improvements2/WebServer/src/FileCache/InvalidateCachesCmd.cs
r397 r402 2 2 using JetBrains.Annotations; 3 3 4 namespace AllocsFixes.FileCache {4 namespace Webserver.FileCache { 5 5 [UsedImplicitly] 6 6 public class InvalidateCachesCmd : ConsoleCmdAbstract { -
binary-improvements2/WebServer/src/FileCache/SimpleCache.cs
r392 r402 3 3 using System.IO; 4 4 5 namespace AllocsFixes.FileCache {5 namespace Webserver.FileCache { 6 6 // Caching all files, useful for completely static folders only 7 7 public class SimpleCache : AbstractCache { … … 24 24 } 25 25 } catch (Exception e) { 26 Log.Out ( "Error in SimpleCache.GetFileContent: " + e);26 Log.Out ($"Error in SimpleCache.GetFileContent: {e}"); 27 27 } 28 28
Note:
See TracChangeset
for help on using the changeset viewer.