diff --git a/CHANGELOG.md b/CHANGELOG.md index f03573b..178742b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.2 (WIP) + +* Clear the entire `Develry.Request.cache` as soon as a non-GET request is made + ## 0.9.1 (2024-02-19) * Rewrite JavaScript tokenizer to no longer use regexes diff --git a/lib/request.js b/lib/request.js index 7fa1471..1682e8a 100644 --- a/lib/request.js +++ b/lib/request.js @@ -456,7 +456,7 @@ Request.setMethod(function setHeader(name, value) { * * @author Jelle De Loecker * @since 0.2.0 - * @version 0.8.15 + * @version 0.9.2 * * @return {Pledge} */ @@ -507,6 +507,11 @@ Request.setMethod(function start() { } } + // If it is not a GET, clear the entire cache + if (this.method != 'GET') { + Request.cache.clear(); + } + // Do the response, follow redirects pledge = this[MAKE_REQUEST](key); diff --git a/package.json b/package.json index 9af7243..a8f2a2f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "protoblast", "description": "Native object expansion library", - "version": "0.9.1", + "version": "0.9.2-alpha", "author": "Jelle De Loecker ", "keywords": [ "prototype",