INNER CODE UNIT · Python

prefixes

piku/piku · piku.py:1058

                prefixes = []  # this will turn into part of /(path1|path2|path3)
                try:
                    items = cache_prefixes.split(',')
                    for item in items:
                        if item[0] == '/':
                            prefixes.append(item[1:])
                        else:
                            prefixes.append(item)
                    cache_prefixes = "|".join(prefixes)
                    echo("-----> nginx will cache /({}) prefixes up to {} or {} of disk space, with the following timings:".format(cache_prefixes, cache_time_expiry, cache_size))
                    echo("-----> nginx will cache content for {}.".format(cache_time_content))
                    echo("-----> nginx will cache redirects for {}.".format(cache_time_redirects))
                    echo("-----> nginx will cache everything else for {}.".format(cache_time_any))
                    echo("-----> nginx will send caching headers asking for {} seconds of public caching.".format(cache_time_control))
                    env['PIKU_INTERNAL_PROXY_CACHE_PATH'] = expandvars(
                        PIKU_INTERNAL_PROXY_CACHE_PATH, locals())
                    env['PIKU_INTERNAL_NGINX_CACHE_MAPPINGS'] = expandvars(
                        PIKU_INTERNAL_NGINX_CACHE_MAPPING, locals())

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…