It is currently May 8th, 2024, 3:14 am
Webparser caching
-
- Posts: 35
- Joined: May 4th, 2009, 4:25 am
Webparser caching
I'd like to be able to cache an RSS feed so that when I'm away from a network connection at the time Rainmeter tries to get the weather info, it will just show the old info instead of n/a. This could also be useful for getting RSS info that I can read on the plane, etc.
-
- Developer
- Posts: 1270
- Joined: April 3rd, 2009, 4:31 am
- Location: NC, US
Re: Webparser caching
How bout we just put in a stripped down version of Gecko...
-
- Posts: 35
- Joined: May 4th, 2009, 4:25 am
Re: Webparser caching
Um... if you mean the HTML layout engine, that wouldn't seem to do the same thing?
I just want to be able to download the RSS information, save a temporary copy, and if on the next request the data can not be fetched, the older temporary copy will be used for parsing instead. If there is a successful connection, it over-writes the old cached copy. So, one file write per fetch, and a little logic (could even be in the config with the right commands), be able to say "if new info not available, used cached copy".
Others have requested the ability to parse a file, so this request could be fulfilled by allowing the parser to read a local file, and then we can incorporate the testing into our measures.
I just want to be able to download the RSS information, save a temporary copy, and if on the next request the data can not be fetched, the older temporary copy will be used for parsing instead. If there is a successful connection, it over-writes the old cached copy. So, one file write per fetch, and a little logic (could even be in the config with the right commands), be able to say "if new info not available, used cached copy".
Others have requested the ability to parse a file, so this request could be fulfilled by allowing the parser to read a local file, and then we can incorporate the testing into our measures.
-
- Developer
- Posts: 1270
- Joined: April 3rd, 2009, 4:31 am
- Location: NC, US
Re: Webparser caching
No, I wasn't suggesting that as a solution for your problem. I was just suggesting that a built in browser would let us do a lot of other things.
-
- Posts: 35
- Joined: May 4th, 2009, 4:25 am
Re: Webparser caching
True. I don't know enough about Gecko and whether it has built-in caching to know if it'd solve the problem I have, though.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Webparser caching
If you set debug=2 it saves a copy of the webpage in your root directory as WebParser.log or something. (not sure of the name, test it and see)
I wonder if you could then point a WebParser measure at that file with a URL of:
file:///c:/webparser.log
and have it read it?
I wonder if you could then point a WebParser measure at that file with a URL of:
file:///c:/webparser.log
and have it read it?
-
- Developer
- Posts: 1270
- Joined: April 3rd, 2009, 4:31 am
- Location: NC, US
Re: Webparser caching
It's WebParserDump.txt. No you can't parse a local file, but the request has already been put in to move the RegExp handling code from the webparser to the Rainmeter core, which will allow for using RegExp in any part of Rainmeter.
Re: Webparser caching
This may be of assistancekati42 wrote:True. I don't know enough about Gecko and whether it has built-in caching to know if it'd solve the problem I have, though.
SeaMonkey and the final Netscape browser (4.3 thru 4.7) were all built on Gecko, and is still commonly utilized as the basis of Firefox