mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-18 18:24:44 -05:00
listing to be precomputed and stored in memcache for retrieval at request-time. Currently only reddit listings are precomputed. Profile-page precomputing is disabled (and relatively untested).
16 lines
415 B
Python
16 lines
415 B
Python
from reddit_base import RedditController
|
|
from validator import *
|
|
from r2.lib.db.queries import CachedResults
|
|
|
|
import cPickle as pickle
|
|
from urllib import unquote
|
|
|
|
class QueryController(RedditController):
|
|
@validate(query = nop('query'))
|
|
def POST_doquery(self, query):
|
|
if g.enable_doquery:
|
|
cr = pickle.loads(query)
|
|
cr.update()
|
|
else:
|
|
abort(403, 'forbidden')
|