mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2024-05-27 07:46:05 +02:00
archwiki: ensure that MediaWiki file cache is invalidated on each MediaWiki update
We've hit this problem at least twice in the past, last time with the new Vector skin update. With this change it should not be necessary to do anything manually after an update.
This commit is contained in:
parent
44fb106eb9
commit
a0f5a42e90
|
@ -15,3 +15,12 @@
|
|||
# reference: https://stackoverflow.com/a/6896903
|
||||
- name: purge nginx cache
|
||||
command: find /var/lib/nginx/cache -type f -delete
|
||||
|
||||
# The MediaWiki file cache can be invalidated by deleting the files in the
|
||||
# cache, by setting $wgCacheEpoch to the current time, or by touching the
|
||||
# LocalSettings.php file (thanks to $wgInvalidateCacheOnLocalSettingsChange
|
||||
# being set to true). References:
|
||||
# - https://www.mediawiki.org/wiki/Manual:File_cache
|
||||
# - https://www.mediawiki.org/wiki/Manual:$wgInvalidateCacheOnLocalSettingsChange
|
||||
- name: invalidate MediaWiki file cache
|
||||
file: path="{{ archwiki_dir }}/public/LocalSettings.php" state=touch
|
||||
|
|
|
@ -60,8 +60,10 @@
|
|||
become_user: "{{ archwiki_user }}"
|
||||
notify:
|
||||
- run wiki updatescript
|
||||
# purge the nginx cache to make sure clients get the updated assets
|
||||
# purge the nginx cache and MediaWiki file cache to make sure clients get updated assets
|
||||
# as well as freshly rendered pages using the new assets
|
||||
- purge nginx cache
|
||||
- invalidate MediaWiki file cache
|
||||
|
||||
- name: configure archwiki
|
||||
template: src=LocalSettings.php.j2 dest="{{ archwiki_dir }}/public/LocalSettings.php" owner="{{ archwiki_user }}" group="{{ archwiki_user }}" mode=0640
|
||||
|
|
Loading…
Reference in New Issue