0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Added logging to RSS cache

- The RSS cache has lived for a really long time, but I'm not sure it's useful
- Want to be able to determine if it gets used much, and if not, then we can remove it
This commit is contained in:
Hannah Wolfe 2024-04-10 13:09:13 +01:00
parent 9e78412268
commit 145a184967

View file

@ -1,5 +1,6 @@
const crypto = require('crypto');
const generateFeed = require('./generate-feed');
const logging = require('@tryghost/logging');
const feedCache = {};
module.exports.getXML = function getFeedXml(baseUrl, data) {
@ -10,6 +11,8 @@ module.exports.getXML = function getFeedXml(baseUrl, data) {
hash: dataHash,
xml: generateFeed(baseUrl, data)
};
} else {
logging.info('[RSS] Serving from in-memory cache');
}
return feedCache[baseUrl].xml;