mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
Cache challenge data for faster loading of /api/v1/challenges (#2232)
* Improve response time of `/api/v1/challenges` and `/api/v1/challenges/[challenge_id]/solves` * Rewrite and remove _build_solves_query to make it cacheable * Closes #2209
This commit is contained in:
@@ -7,7 +7,7 @@ import random
|
||||
import argparse
|
||||
|
||||
from CTFd import create_app
|
||||
from CTFd.cache import clear_config, clear_standings, clear_pages
|
||||
from CTFd.cache import clear_challenges, clear_config, clear_standings, clear_pages
|
||||
from CTFd.models import (
|
||||
Users,
|
||||
Teams,
|
||||
@@ -352,4 +352,5 @@ if __name__ == "__main__":
|
||||
|
||||
clear_config()
|
||||
clear_standings()
|
||||
clear_challenges()
|
||||
clear_pages()
|
||||
|
||||
Reference in New Issue
Block a user