mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
rename CACHE_DIR -> CACHE_PATH to unify with rest of Pelican
CACHE_PATH can now be relative to settings file like OUTPUT_PATH. Also add --cache-path commandline option. Change cache loading warning to a less scary and more helpful message.
This commit is contained in:
parent
f2549650e6
commit
5bad061c19
6 changed files with 41 additions and 29 deletions
|
|
@ -275,7 +275,11 @@ def parse_arguments():
|
|||
help='Relaunch pelican each time a modification occurs'
|
||||
' on the content files.')
|
||||
|
||||
parser.add_argument('-c', '--ignore-cache', action='store_true',
|
||||
parser.add_argument('--cache-path', dest='cache_path',
|
||||
help=('Directory in which to store cache files. '
|
||||
'If not specified, defaults to "cache".'))
|
||||
|
||||
parser.add_argument('--ignore-cache', action='store_true',
|
||||
dest='ignore_cache', help='Ignore content cache '
|
||||
'from previous runs by not loading cache files.')
|
||||
|
||||
|
|
@ -300,6 +304,8 @@ def get_config(args):
|
|||
config['DELETE_OUTPUT_DIRECTORY'] = args.delete_outputdir
|
||||
if args.ignore_cache:
|
||||
config['LOAD_CONTENT_CACHE'] = False
|
||||
if args.cache_path:
|
||||
config['CACHE_PATH'] = args.cache_path
|
||||
if args.selected_paths:
|
||||
config['WRITE_SELECTED'] = args.selected_paths.split(',')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue