Using SHA1 for problem data cache
This commit is contained in:
parent
6b7a20e60c
commit
db447f8487
1 changed files with 2 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import hashlib
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
@ -248,7 +249,7 @@ def get_visible_content(data):
|
||||||
|
|
||||||
|
|
||||||
def get_file_cachekey(file):
|
def get_file_cachekey(file):
|
||||||
return file.replace(' ', '===')
|
return hashlib.sha1(file.encode()).hexdigest()
|
||||||
|
|
||||||
def get_problem_case(problem, files):
|
def get_problem_case(problem, files):
|
||||||
result = {}
|
result = {}
|
||||||
|
|
Loading…
Add table
Reference in a new issue