locked
Enterprise Library RRS feed

  • Question

  • I am using the Enterprise Library Caching Block.  As per our requirements the object has to be cached with some expiration duration and some are to be cached without the duration (until the scavenger cleans such entries) in the SQL database.

    I wanted to know whether there is a way to get the expiration duration for all such cached items through C#.

    This is to get the control of the cached item and refresh the same if the data is too old and the maximumElementsInCacheBeforeScavenging setting is reached.
    • Moved by jack 321 Friday, June 6, 2008 6:42 AM off topic for C# general
    Wednesday, June 4, 2008 1:16 PM

All replies

  • public class BellErkennung { 
     
      private Hundetuer tür; 
     
      public BellErkennung(Hundetuer tür) { 
        this.tür = tür; 
      } 
     
      public void erkennen(Bellen bellen) { 
        System.out.println("   BellErkennung: ‘" + 
          bellen.getGeräusch() + "’ gehört"); 
        List zulässigeBellen = tür.getZulässigeBellen(); 
        for (Iterator i = zulässigeBellen.iterator(); i.hasNext(); ) { 
          Bellen zulässigesBellen = (Bellen)i.next(); 
          if (zulässigesBellen.equals(bellen)) { 
            tür.öffnen(); 
            return
          } jutsu
        } 
        System.out.println("Dieser Hund ist nicht erlaubt."); 
      } 

    Monday, April 18, 2011 5:27 PM