Should work in the trunk version:

http://216.121.112.228/browse/NH-1989

--------------------------------------------------
From: "graphicsxp" <[email protected]>
Sent: Tuesday, May 18, 2010 5:02 PM
To: "nhusers" <[email protected]>
Subject: [nhusers] Re: Future and caching.

up.

no one has an idea regarding this ?

On 12 mai, 22:48, graphicsxp <[email protected]> wrote:
Hi,

I'm trying to use the Future() method and it works fine except I don't
know how to take advantage of caching with it :

      var countArt = criteriaCount.SetCacheable(true).SetProjection(
          Projections.Count(Projections.Id())).FutureValue<Int32>();

      var results = criteria.SetFirstResult(page * pageSize)
                      .SetMaxResults(pageSize)
                      .SetCacheable(true)
                      .Future<BuzzUserArt>();

      count = countArt.Value;

      var all = new List<BuzzUserArt>();
      foreach (var o in results)
      {
        all.Add((BuzzUserArt)o);
      }

SetCacheable has no effect here, the database is always hit.

I must point out that if I use a MultiCriteria query instead of
Future, it works fine and SetCacheable does its job. But I just wanted
to take advantage of this new function.

Any clue ?

--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group athttp://groups.google.com/group/nhusers?hl=en.

--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.



--
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to