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:
parent
9e78412268
commit
145a184967
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue