Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 11th, 2012  |  syntax: None  |  size: 0.25 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Multiple asp.net requests calling same sql server 2005 stored procedure
  2. GetData() {
  3.   if (cached) return cache;
  4.   if (caching) {
  5.     // wait for it to finish
  6.     return cache;
  7.   }
  8.   caching=true;
  9.   cache = CallProc();
  10.   cached = true;
  11.   caching = false;
  12. }