made sure that the filecache keeps is not removed when auction refresh fails

This commit is contained in:
Computerboer
2024-10-13 21:12:33 +02:00
parent 28adf3dcf3
commit d295f18226
4 changed files with 34 additions and 21 deletions

View File

@@ -8,10 +8,13 @@ from datetime import datetime
import re
import math
def getAuctionlocations(countrycode: Countrycode):
def getAuctionlocations(countrycode: Countrycode, clearcache:bool = False):
cachename = 'allauctions_' + countrycode
res = FileCache.get(cachename, 23)
if(clearcache):
res = FileCache.get(cachename, 1)
else:
res = FileCache.get(cachename)
if(res):
return res