It is always 24 hours so 3600*24 is 86400s that was the easy part. @cache(request.env.path_info,time_expire=86400,cache_model=cache.disk) adding this decorator to the function isn't that difficult either.
The thing I wan't is to have something which loads the page at 00:05 every day. for all eternity. So that the first user which opens the page gets the cached page. and doesn't have to wait that long. On Sunday, April 14, 2013 2:07:48 PM UTC+2, Niphlod wrote: > > use a function to inspect request.now and calculate how many seconds you > want the data to be stored.....then pass that value to the time_expire > parameter. > > On Sunday, April 14, 2013 12:35:59 PM UTC+2, BlueShadow wrote: >> >> Hi, >> I'm loving the @cache decorator like this one. >> @cache("key", time_expire=100, cache_model=cache.disk) >> Now I have a very specific problem. I want to display some results of a >> testing machine which gives out huge amounts of data. 1MB CSV. which is >> after dropping the useless data still 200kB of data. >> The Old data has to be used to. So right now I got 21MB of database which >> needs to be parsed. >> Those test results come via email to my w2p app. which works great. The >> results come in every day at midnight. >> So I thought it would be ideal to cache the output. >> At Midnight there is no server load so it would be perfect to do all the >> work right after the data comes in cache it and store it until the next >> chunk of data comes in. >> So is there a way to load the funktion from w2p lets say every day at >> 00:05 cache the data for 24 hours. >> > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.