Commit c5184859 by Tuukka Kivilahti

publish -> publishLast, now the last query is 'replayed' if there is some late subscriber

1 parent d165e980
...@@ -19,6 +19,8 @@ export class AppComponent { ...@@ -19,6 +19,8 @@ export class AppComponent {
}); });
}); });
} }
......
...@@ -84,7 +84,7 @@ export class CacheService { ...@@ -84,7 +84,7 @@ export class CacheService {
let hotSource = source let hotSource = source
.do(val => this.cache.set(cacheName, new CachedItem(moduleName,cachePath, val))) .do(val => this.cache.set(cacheName, new CachedItem(moduleName,cachePath, val)))
.publish().refCount(); .publishLast().refCount();
this.cache.set(cacheName, new CachedItem(moduleName,cachePath, hotSource, true)); this.cache.set(cacheName, new CachedItem(moduleName,cachePath, hotSource, true));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!