DarkIntaqt / challenges

A League of Legends 3rd-party website tracking Challenges, serving leaderboards and much more...

Home Page:https://challenges.darkintaqt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get.js to .ts and add a variable caching some static requests

DarkIntaqt opened this issue · comments

HELP WANTED

Cache request by the get.js function itself to prevent a larger codebase due to caching checks, instead save every request in a list in the get.js file. Maybe like this:

{
   "https://example.com": requestObject + timestamp,
   "https://example.com/title": requestObject + timestamp
}

I would add an timestamp to get still pretty current responses, maybe 6-10 hours or a day. I would not cache the user requests, or I add a timestamp containing every 5 minutes in the url itself. Same goes for the leaderboard, I would only refresh it once every hour or so using a request.

During this opportunity, it would be a great way to rewrite this file in typescript for a cleaner code base.

it is not working as I want it, so I would wait, as this feature is not needed