Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move cachebusters names to constants.py
- Loading branch information
Showing
7 changed files
with
32 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from .api import get_user_acl, add_acl, serialize_acl | ||
|
||
|
||
default_app_config = 'misago.acl.apps.MisagoACLsConfig' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ACL_CACHEBUSTER = 'misago_acl' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
from misago.core import cachebuster as cb | ||
from misago.core import cachebuster | ||
|
||
|
||
ACL_CACHE_NAME = 'misago_acl' | ||
from .constants import ACL_CACHEBUSTER | ||
|
||
|
||
def get_version(): | ||
return cb.get_version(ACL_CACHE_NAME) | ||
return cachebuster.get_version(ACL_CACHEBUSTER) | ||
|
||
|
||
def is_valid(version): | ||
return cb.is_valid(ACL_CACHE_NAME, version) | ||
return cachebuster.is_valid(ACL_CACHEBUSTER, version) | ||
|
||
|
||
def invalidate(): | ||
cb.invalidate(ACL_CACHE_NAME) | ||
cachebuster.invalidate(ACL_CACHEBUSTER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters