ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Maves" <nathan.ma...@gmail.com>
Subject Re: problem with flushInterval in cacheModel
Date Tue, 06 Nov 2007 15:42:02 GMT
To your point of the exception that you get when you set the interval to 720
hours,  can you post the exception?

As far as the code goes....

public void setFlushInterval(int hours, int minutes, int seconds, int
milliseconds) {
    errorContext.setMoreInfo("Check the cache model flush interval.");
    long t = 0;
    t += milliseconds;
    t += seconds * 1000;
    t += minutes * 60 * 1000;
    t += hours * 60 * 60 * 1000;
    if (t < 1)
      throw new RuntimeException("A flush interval must specify one or
more of milliseconds, seconds, minutes or hours.");
    cacheModel.setFlushInterval(t);
  }

There is no reason why the value of 720 should fail.

Nathan

On Nov 4, 2007 2:01 PM, Odelya Glick <odelya@jpost.com> wrote:

> HI,
>
> I have declared the following cacheModel
> <cacheModel id="countriesCache" type="LRU">
>                <flushInterval hours="720" />
>                <property name="size" value="100" />
>        </cacheModel>
>
> But I get an exception that flush must be declared either with hours, min
> or
> so.
> When I changed it to hours="24" it's fine.
>
> What's the limit?
>
> and if I want it to be cached for good?
>
> (I don't think to ever change the countries table).
>
> Thank you,
>
> Odelya
> web-programmer
> 050-2052075
>
>
>

Mime
View raw message