LE的Django静态预编译器

2024-09-30 12:20:42 发布

您现在位置:Python中文网/ 问答频道 /正文

我用这个-https://github.com/andreyfedoseev/django-static-precompiler,一切似乎都很好,但我有一个问题。每次使用less模板时是否都会编译less文件?还是有某种缓存?我这么问是因为更少的文件可能会相当大,如果每次用户提出请求时都会发生较少的编译,这真是令人沮丧。在


Tags: 文件django用户httpsgithubcom模板static
1条回答
网友
1楼 · 发布于 2024-09-30 12:20:42

https://github.com/andreyfedoseev/django-static-precompiler,您可以阅读:

    STATIC_PRECOMPILER_USE_CACHE
    Whether to use cache for inline compilation. Default: True.
    STATIC_PRECOMPILER_CACHE_TIMEOUT
    Cache timeout for inline styles (in seconds). Default: 30 days.
    STATIC_PRECOMPILER_MTIME_DELAY
    Cache timeout for reading the modification time of source files (in seconds). Default: 10 seconds.
    STATIC_PRECOMPILER_CACHE_NAME
    Name of the cache to be used. If not specified then the default django cache is used. Default: None.

相关问题 更多 >

    热门问题