Dne 8.7.2016 v 15:23 John Keeping napsal(a): > Can't you already do this by removing scan-path from your config and > instead adding something like: > > include /path/to/my/repo-list
For the record it is include=/path/to/my/repo-list (it took me some time to figure it out) > and you can generate the repo-list file with: > > cgit --scan-path=/path/to/repositories >repo-list Yes!! This is doing exectly what I wanted. > It's not quite the same because the rest of the configuration won't have > been loaded but I think we'd rather improve this mechanism that add > manual cache mangement. For others: I patched /etc/cgitrc with --- /etc/cgitrc 2016-07-11 12:50:16.761192000 +0000 +++ /etc/cgitrc.slow 2016-07-11 12:50:18.088191000 +0000 @@ -6,7 +6,7 @@ cache-dynamic-ttl=120 cache-repo-ttl=120 cache-root-ttl=120 -cache-scanrc-ttl=120 +cache-scanrc-ttl=10 cache-about-ttl=120 cache-snapshot-ttl=120 cache-size=100000 @@ -81,4 +81,4 @@ #repo.readme=info/web/about.html project-list=/var/lib/copr-dist-git/cgit_pkg_list #scan-path=/var/lib/dist-git/git/rpms -include=/var/cache/cgit/repo-list.rc +scan-path=/var/lib/dist-git/git/rpms And created this hourly cronjob: #!/usr/bin/bash ( flock -n 9 || exit 1 # ... commands executed under lock ... CGIT_CONFIG="/etc/cgitrc.slow" /var/www/cgi-bin/cgit --scan-path=/var/lib/dist-git/git/rpms >/var/cache/cgit/repo-list.rc.new >/dev/null && mv -f >/var/cache/cgit/repo-list.rc.new /var/cache/cgit/repo-list.rc ) 9>/var/lock/mylockfile And - yes - it seems to do exactly what I wanted. -- Miroslav Suchy, RHCA Red Hat, Senior Software Engineer, #brno, #devexp, #fedora-buildsys _______________________________________________ CGit mailing list [email protected] http://lists.zx2c4.com/mailman/listinfo/cgit
