I needed to control expiration of FeedsNodeProcess generated content based not on the time of first import, but on the last time the source content was present. For example, the content may be posted on the source site for 1 day or 3 months, I want the content to expire on my site within about a day of it disappearing from the source.
I modified FeedsNodeProcess to "touch" the imported timestamp for existing content with matching hash (therefore the node itself doesn't get updated). Then I altered the expire method to optionally allow the age of the node to be determined by either the node publication date (original behavior) or the last imported time (new behavior).
Hopefully other people will find this feature useful, so I have provided a patch (against alpha12) for anyone who is interested.
Comment | File | Size | Author |
---|---|---|---|
expire-by-imported.patch | 5.19 KB | nelson_rp | |
Comments
Comment #1
alex_b CreditAttribution: alex_b commentedIs this feature essentially the same as what's requested in #661314?
#661314: "Sync" or "cache" mode
Comment #2
nelson_rp CreditAttribution: nelson_rp commentedLooks like it is a dup of #661314 (with the exception of some of rjbrown99's "garbage" code). How should it be handled? Should I repost the patch on that issue and mark this as duplicate?
Comment #3
alex_b CreditAttribution: alex_b commentedYes, please.