vermiculus / sx.el

Stack Exchange for Emacs
http://stackapps.com/q/3950
715 stars 40 forks source link

Question storage cache #60

Open jleechpe opened 10 years ago

jleechpe commented 10 years ago

As a point of reference:

(questions ;; List to store all question info
 (site1 ;; One sublist per site
  (starred q1 q2 q3 ... qn) ;; List of starred questions on site
  (hidden q1 q2 q3 ... qn) ;; Questions to never see again
  (read ;; Read/unread status of the questions
   (q1 . q1-date)
   (qn . qn-date))
  (saved  ;; Offline storage of questions.  Defaults to any starred questions
   (q1 last-updated . (q1-data))
   (q2 last-updated . (q2-data))))
 (site2 ...))

read has been implemented by Bruce-Connor.

Retrieving favorites/starred per site is /me/favorites q#-data would just be a write-to-cache/file copy of the question. last-updated being when the question was last stored.

Alternately for each stored question:

(q1 last-updated starred . (q1-data))
jleechpe commented 10 years ago

Update:

Based on discussions on gitter today, the cache setup will be more of the sort:

questions-hidden.el
  `- (SITE QUESTION_ID QUESTION_ID ...)
questions-read.el
  `- (SITE (QUESTION_ID . TIME) (QUESTION_ID . TIME) ...)
questions-favorites.el
  `- (SITE QUESTION_ID QUESTION_ID ...)