我使用这个 - https://github.com/andreyfedoseev/django-static-precompiler,一切似乎都运转正常,但我有一个问题。每次使用较少的模板时,是否会出现较少文件的编译?还是有某种缓存?我问,因为较少的文件可能相当大,如果用户每次发出请求时发生的编译都很少,那真的很令人沮丧。
答案 0 :(得分:0)
在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.