Ihor Radchenko <yanta...@gmail.com> writes:

> Lele Gaifax <l...@metapensiero.it> writes:
>
>> I wonder if there is some mechanism I could use to either prevent caching
>> of non-local documents or to avoid the check on existence in the
>> org-persist-gc.
>
> I can easily make a change that always garbage-collect non-local
> documents without trying to connect to remote server. This can be one
> solution of your problem. However, I am not sure if it is the best
> solution.
>
> May I know more about your use cases? Do you frequently open large
> remote Org files? If you do, trashing their cache may not be optimal.

I do not open remote Org files very often, but surely happens now and then,
typically from my laptop to see/edit something I keep on my desktop PC.

> Maybe we should better make this a user option?

Yes, that's what I had in mind: when (say) org-persist-do-not-auto-gc-remotes
is enabled, the cleanup procedure would ignore remote Org documents and a new
explicit (interactive) org-persist-gc-remotes would take care of them.

> Or we can go a different route and just not garbage collect remote files
> until cache gets too large.

Yes, a threshold would work too.

Thanks a lot,
ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it  |                 -- Fortunato Depero, 1929.


Reply via email to