Commit Graph

11 Commits

Author SHA1 Message Date
Nimisha Asthagiri
6f9b810f9a Storage-backed versioned Block Structures: Configuration 2017-02-27 00:39:22 -05:00
Toby Lawrence
6704e17afd [TNL-5632] Optimize the single_thread view.
Firstly, we're now explicitly instructing the comments service to not
return thread responses/comments if the request isn't AJAX.  So, if you
load the URL for a single discussion thread in your browser, this would
be a non-AJAX call and we'll avoid loading the responses for the entire
thread behind-the-scenes.  Big win here for large threads.

Next, we removed a redundant "get threads" call which was also happening
behind-the-scenes.  This call was redundant as the front-end JS also
grabs the thread list when a topic is chosen, so we were making an
extranenous call for no benefit.  Poof, gone!

Finally, we added some caching of database queries that are required to
drive a lot of the permissions/cohorts machinery around discussion.
This will have a minimal effect but introduced a cleaner way to apply
general memoization at the per-request level which will let us further
cache things as we identify them as issues.
2016-10-18 13:11:30 -04:00
Calen Pennington
97136768f9 Empty the RequestCache if the request ends in an exception 2016-06-09 10:10:40 -04:00
Calen Pennington
437b249d68 Use django_crum to access the current request in request_cache 2016-06-08 16:35:25 -04:00
Calen Pennington
7b0c22afe9 Make request_cache easier to use 2015-07-20 14:53:10 -04:00
Calen Pennington
1e0163a27a Make RequestCache.clear_request_cache a classmethod 2015-06-15 09:50:44 -04:00
jsa
3dede202f1 Implement student-initiated refunds for external commerce service.
XCOM-306
2015-05-21 11:37:37 -04:00
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
stv
d5d6e3f0d8 Fix PEP8: W293 blank line contains whitespace 2014-11-10 10:59:53 -08:00
stv
d87cfa90bf Fix PEP8: W292 no newline at end of file 2014-11-10 10:59:44 -08:00
Chris Dodge
03f9bb5d38 use a request-scoped cache to keep the metadata inheritence tree around for the whole request. This means we should only do one trip to Memcached/Mongo per course per request. This is expected to keep memory utilization down 2013-03-27 22:37:07 -04:00