Hi, I have a entity that is mapped to a table containing referential data.

    public sealed class EntityMap : ClassMap<Entity>
    {
        public EntityMap()
        {
            ReadOnly();
            Table("TABLE");
            Id<DateTime>("DATE");
            Map(h => h.Date, "DATE");
            Cache.ReadOnly().Region("ENTITY_REGION");
        }
    }

        public IEnumerable<DateTime> RetrieveAllDates()
        {
            return Session.Query<Entity>()
                .Cacheable()
                .CacheRegion("ENTITY_REGION")
                .CacheMode(CacheMode.Normal)
                .Select(x => x.Date)
                .ToList();
        }

            _configuration = fluentConfiguration
                //snip
                .Cache(c => c
                    .UseQueryCache()
                    .UseSecondLevelCache()
                    .ProviderClass<SysCacheProvider>())
                .BuildConfiguration();

    <syscache>
      <cache region="ENTITY_REGION" expiration="86400" priority="5" />
    </syscache>

The cache is enabled and works, but the expiration does not. It's like the 
region is ignored, and a default expiration is used (5 minutes).
I have noticed that setting the cache expiration in the fluent config does 
work, but I would like to have 2 or 3 different expiration windows, and 
that is what these regions are for, no?

Any help is welcome!

Thanks in advance,
Mathia



-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to