From: espie Date: Thu, 12 May 2022 14:21:06 +0000 (+0000) Subject: explicitly write LRU in a comment so that it's easier to find ;) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ad2daeff7894f9d3274e57d9f8fc5c58058c6118;p=openbsd explicitly write LRU in a comment so that it's easier to find ;) --- diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm index 995c87dbeaa..e3a24526b85 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgCreate.pm,v 1.174 2022/01/13 12:21:22 espie Exp $ +# $OpenBSD: PkgCreate.pm,v 1.175 2022/05/12 14:21:06 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -1549,6 +1549,8 @@ sub finish_manpages } } +# we maintain an LRU cache of files (by checksum) to speed-up +# pkg_add -u sub save_history { my ($self, $plist, $dir) = @_; @@ -1608,6 +1610,7 @@ sub save_history close($f); rename("$fname.new", $fname); } + # XXX if we don't have any history, we don't need to do this # create a new list with check points. my $l = [@$tail]; my $i = 0;