]> gitweb.fluxo.info Git - puppet-git.git/commitdiff
Increase caching
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 7 Sep 2025 14:06:18 +0000 (11:06 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 7 Sep 2025 14:06:18 +0000 (11:06 -0300)
manifests/cgit.pp
templates/cgitrc.erb

index dec90249fa22bb2176974d3c40378cf815f212fe..45558ac724ace19e534aceceb4eab898cc9f7596 100644 (file)
@@ -1,16 +1,18 @@
 class git::cgit(
-  $css               = '/cgit-css/cgit.css',
-  $logo              = '/cgit.png',
-  $root_title        = 'Git Repository Browser',
-  $root_desc         = 'a fast webinterface for the git dscm',
-  $clone_url         = 'https://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL git://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL git@$HTTP_HOST:$CGIT_REPO_URL',
-  $cache             = '1',
-  $cache_size        = '10000',
-  $cache_about_ttl   = '15',
-  $cache_dynamic_ttl = '15',
-  $cache_static_ttl  = '4460',
-  $cache_root_ttl    = '15',
-  $cache_repo_ttl    = '120',
+  $css                = '/cgit-css/cgit.css',
+  $logo               = '/cgit.png',
+  $root_title         = 'Git Repository Browser',
+  $root_desc          = 'a fast webinterface for the git dscm',
+  $clone_url          = 'https://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL git://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL git@$HTTP_HOST:$CGIT_REPO_URL',
+  $cache_about_ttl    = '30',
+  $cache_dynamic_ttl  = '30',
+  $cache_repo_ttl     = '120',
+  $cache_root         = '/var/cache/cgit',
+  $cache_root_ttl     = '60',
+  $cache_scanrc_ttl   = '60',
+  $cache_size         = '20000',
+  $cache_snapshot_ttl = '60',
+  $cache_static_ttl   = '86400',
 ) {
   package { 'cgit':
     ensure  => $::lsbdistcodename ? {
index 8917fb978e1e58b6efa8313943b9dee9c8d5cd8f..3838b0d711c8e7618f39356d7cc17da3ce52bbac 100644 (file)
@@ -13,13 +13,15 @@ clone-url=<%= @clone_url %>
 snapshots=tar.gz tar.bz2
 
 # caching
-cache=<% @cache %>
-cache-size=<% @cache_size %>
 cache-about-ttl=<% @cache_about_ttl %>
 cache-dynamic-ttl=<% @cache_dynamic_ttl %>
-cache-static-ttl=<% @cache_static_ttl %>
-cache-root-ttl=<% @cache_root_ttl %>
 cache-repo-ttl=<% @cache_repo_ttl %>
+cache-root=<% @cache_root %>
+cache-root-ttl=<% @cache_root_ttl %>
+cache-scanrc-ttl=<% @cache_scanrc_ttl %>
+cache-size=<% @cache_size %>
+cache-snapshot-ttl=<% @cache_snapshot_ttl %>
+cache-static-ttl=<% @cache_static_ttl %>
 
 # switches
 enable-http-clone=1