Last active
October 25, 2016 14:27
-
-
Save asimmon/aacecf21d70ccd5e3496 to your computer and use it in GitHub Desktop.
Caching method results with AOP, call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Console.WriteLine(worker.Process("foo")); | |
Console.WriteLine(worker.Process("foo")); | |
Console.WriteLine(worker.Process("foo")); | |
Console.WriteLine("Sleeping 2 seconds..."); | |
Thread.Sleep(2000); | |
Console.WriteLine(worker.Process("foo")); | |
// result | |
// b7d719b45a01469797c974164179b4b5 | |
// b7d719b45a01469797c974164179b4b5 | |
// b7d719b45a01469797c974164179b4b5 | |
// Sleeping 2 seconds... | |
// f2ad87faf4fa4daa98ad1fc3e87fde37 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment