Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

I would like to add a cache layer to my app for questions, answers and comments.
The last_activity_date parameter on /questions route seems a valid candidate (probably the only way available)
The help says:

"last_activity_date": {
     "description": "last time this post had any activity",
     "values": "unix epoch date, range [0, 253,402,300,799]",
     "optional": true
 }

What do you mean with any activity?
What kind of events modify this date?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Activity is defined as, "whatever the site considers Activity." Yeah...

More usefully, the current list is:

  • edits (on the post themselves, and on an answer a question owns)
  • opening a bounty
  • a new answer
  • initial creation

Basically, if it "bumps" a question its activity.

share|improve this answer
    
@Kevin uhm, as suspected it does not consider the comments. Do you know where to look at this information? I would like to be sure that people using StackPrinter print also the new comments. –  systempuntoout Oct 30 '10 at 4:09
1  
@systempuntoout - query /posts/{id}/comments. It'll accept a set of mixed question and answer ids, and has a creation sort (with associated min/max parameters). Comment edits will be missed, but those are exceedingly rare (and excepting moderators/developers, can only occur within 5 minutes of a comments creation; so you can grab them with a a modifier on min). –  Kevin Montrose Oct 30 '10 at 4:16
    
@Kevin well, vectorized parameters are limited, isn't it? Your solution won't work for questions with hundreds of answers :( –  systempuntoout Oct 30 '10 at 16:38
    
@systemputoout - if you're looking to keep a copy of SO up to date, it is rather difficult. If you're looking to keep a small subset (say, the last 100 q/a's printed) its perfectly tractable. –  Kevin Montrose Oct 30 '10 at 19:34
    
@Kevin yes, the last 100 q/a's printed are enough. But how could I achieve that if vectorized parameter has an upper limit? (more than one query just to check if comments are changed is out of discussion, in that case I would give up the caching idea) –  systempuntoout Oct 30 '10 at 20:55
    
@systempuntoout - the limit on vectorized ids is 100... maybe I'm not following, but it seems to me if you're already tracking the last hundred total question and answers (that is # q's + # a's = 100) printed it should just be 1 API query to get any new/modified (excepting moderator modifications) comments on them. –  Kevin Montrose Oct 30 '10 at 22:19
    
@Kevin moved the topic here –  systempuntoout Oct 31 '10 at 10:24
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .