pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pan-users] Re: Clearing the cache


From: Duncan
Subject: [Pan-users] Re: Clearing the cache
Date: Tue, 16 Jan 2007 10:09:29 +0000 (UTC)
User-agent: pan 0.120 (Plate of Shrimp)

Bruce Bowler <address@hidden> posted
address@hidden, excerpted below, on  Mon, 15
Jan 2007 11:26:31 -0500:

> ISTR (although I could be wrong) that in 'old pan', there was a
> configuration setting (or something else) that told 'old pan' to delete
> the article cache on exit.
> 
> 2 questions.
> 
> 1) Am I right?

Yes.  (I still have the old binary hanging 'round and just launched it,
just to be sure.)

> 2) Is there a way to get 'new pan' to delete the article cache on exit
> automatically?  I know I can delete .pan2/article-cache manually, but I'm
> looking for something more automatic that works for both linux and
> windows.

Well, that option's gone... I believe due to the simplified options dialog.
Charles took everything out and only put stuff back as enough folks
requested it to know it was used enough to be worth the complexity, both
to the users and in maintaining the code, of putting it back in.  Few
requested that option (you may be the first or I may have seen one other)
be returned, so it wasn't judged worth confusing the options dialog with
that one more choice.

That said... there /may/ be a way to do it, by editing the configuration
files directly.  There are a number of settings that Charles thinks
are too complicated for his intended simple config UI in pan itself,
that never-the-less are exposed as entries in the config files
themselves, so advanced users can tweak them if they like.  There are
several settings I do just that with and it works great, except that I do
the opposite of what you do, as I want a huge cache (gigabytes) that stays
around until I delete it manually, so I can't say whether this will work
for your strategy or not.  Test it and see, however, as it's likely one of
the two following suggestions will work.

The files in question (edit with pan closed, naturally) are
$PAN_HOME/servers.xml and $PAN_HOME/preferences.xml.  ($PAN_HOME defaults
to ~/.pan2/, unless you set it manually in pan's environment.)  

The two settings in question are the cache size, set in preferences.xml,
and the expiration time, set per server in servers.xml.  

By default, the cache size is 10 MB, too small for me since I download to
cache first, then work on what's cached for awhile before erasing it and
downloading more, so I have mine set to 5 gigs for my text instance and 12
gigs for my binary instance (putting $PAN_HOME to use, I keep two separate
pan configs, well three, those two and a test instance, so I can have
separate configs and caches for each).  That works great. =8^)

The critical thing to remember here is that if you save directly instead
of downloading to cache and working from there (as I do), cache isn't
/really/ needed, as pan automatically keeps what it's actually downloading
at the moment (or at least, that seems to be what it does, I've never
known anyone to try what I'm going to propose, so whether it will
actually work at that level the way it seems to at 10MB remains to be
seen), even if it's bigger than the cache size.  Thus, you /should/ be
able to set a ZERO size cache, and have pan delete stuff as soon as it's
done with it (saving it for binaries, displaying it for text).

The caveat using a zero sized cache is going to be that going back to the
previous post will likely mean redownloading it!  This doesn't make a lot
of sense to me, but then, neither does wanting to auto-delete the cache,
so if one suits your way of working, maybe the other does as well. <shrug>

Pretty much the same thing applies to the second setting you can try, the
expiration.  In the GUI, the lowest selectable setting is 2 weeks, but the
setting is in number of days in the file.  If you set it to zero... it
might work or might behave unpredictably... I really don't know.  Of
course, you can set it to one... but that's not quite what you want.  If
we're lucky, setting zero but keeping the cache size at the default 10 MB
(or try 1 MB) will keep the cache around, at the specified size, until you
either switch groups (which causes pan to save state, and presumably
expire articles, tho I've no idea because as I said, I like them to stay
around until I delete them manually, so I have them set to never expire,
here) or quit pan, which seems to be your desired behavior.

If neither of those work, there's always the scripted approach.  Create a
script that launches pan, then hangs around until it quits, then deletes
the cache.  That's simple enough to do as a bash script in Linux, or a
batch file in MSWormOS, altho they won't be exactly the same, of course. 
I already mentioned that I keep multiple pan instances here, and I use 
bash launch scripts to set the $PAN_HOME var and do other misc. stuff
before launching pan.  Then simply modify your usual launch method (menu,
hotkey, whatever) to call the script, instead of launching pan directly,
and you have your solution! =8^)  If you need help with the bash script, I
can whip one up for you, but I haven't used MSWormOS since eXPrivacy came
out and MS left me little choice but to upgrade to Linux instead.  Not
that I'm at all complaining that they pushed me into it, as I'm /vastly/
happier in the world of freedom, but that's what happened, and I've not
looked back since, nor could I do so now even if I wanted to, at least
legally, where EULAs could be considered binding, since I couldn't agree
to most slaveryware EULAs any more, since that's precisely what it'd
amount to from my perspective, agreeing myself into slavery.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman





reply via email to

[Prev in Thread] Current Thread [Next in Thread]