Skip to content

Instantly share code, notes, and snippets.

@angelnikolov
Created June 14, 2018 10:01
Show Gist options
  • Save angelnikolov/5266fbc4bfaf787c6b2a5df3d5022751 to your computer and use it in GitHub Desktop.
Save angelnikolov/5266fbc4bfaf787c6b2a5df3d5022751 to your computer and use it in GitHub Desktop.
const articleNotifier = new Subject();
@Injectable()
export class ArticleService {
constructor(private _http: HttpClient) {}
@Cacheable({
cacheBusterObserver: articleNotifier
})
getArticles() {
return this._http();
}
@CacheBuster({
cacheBusterNotifier: articleNotifier
})
createArticle() {
return this._http();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment