Geeks With Blogs
AngelEyes on .Net Tips, tricks and WTFs about Asp .Net, SQL Server and the likes. September 2011 Entries
GetFileFingerPrint method
This method is a demonstration for use of C# (csharp) Tasks and the Cache object together, to create a nice thread-safe behavior for calculations, and be efficient in the simple don't-repeat-any-action way. public AdsFileInfo GetFileFingerPrint(string filename) { Log.DebugFormat("Trying to get cached file finger print for '{0}'", filename); //First, try to get the value from the cache. object ret = HttpRuntime.Cache.Get(filen... if (ret != null) { //We got the value from the cache. Log.DebugFormat("Got ......

Posted On Thursday, September 1, 2011 3:25 PM

Copyright © AngelEyes | Powered by: