This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse
Krzysztof Kotlarek 9610aea189
FEATURE: cache last post number (#15772)
Instead of relaying on /timings request, we should cache last read post number. That should protect from having incorrect unread counter when going back to topic list.

This additional cache is very temporary as once /timings request is finished, serializer will have a correct result.

Simplified flow is:
1. Store in cache information about last seen post number before /timings request is sent
2. When getting back to topic list compare value of last seen post number returned by /latest request and information in cache. If cache number is higher, than use it instead of information returned by /latest. In addition delete cache item as there is high chance that `/timings` request already finished.
3. Optionally, delete cache when timings request is done and topic list was not yet visited.

Keeping cache reasonably small should not affect performance.
2022-02-10 13:09:28 +11:00
..
app FEATURE: cache last post number (#15772) 2022-02-10 13:09:28 +11:00
config DEV: Allow ember server --environment production to be used (#15431) 2021-12-31 12:26:23 +00:00
lib DEV: Improve Ember module shims under Ember CLI (#15795) (#15806) 2022-02-03 17:36:32 +00:00
public/assets/scripts DEV: Improve Ember module shims under Ember CLI (#15795) (#15806) 2022-02-03 17:36:32 +00:00
tests FEATURE: cache last post number (#15772) 2022-02-10 13:09:28 +11:00
.ember-cli REFACTOR: Sync up master with changes for Ember-CLI (#11671) 2021-01-12 10:13:21 -05:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
ember-cli-build.js DEV: Improve test paths pattern for Ember CLI. 2022-02-07 09:22:15 +08:00
package.json Revert "PERF: Update ember-auto-import (#15814)" (#15854) 2022-02-07 22:41:07 +00:00
testem.js DEV: Update plugin JS loading in Ember CLI testem environment 2022-01-18 10:16:29 +00:00