0.0.1 • Published 5 years ago
@guillermocorrea/cacheable v0.0.1
@guillermocorrea/cacheable
Angular method decorator to cache Observable results.
Example
@Injectable({
providedIn: 'root'
})
export class TodoService {
constructor(private http: HttpClient) {}
@cacheable()
getTodo(id: number) {
return this.http.get(`https://jsonplaceholder.typicode.com/todos/${id}`);
}
}
0.0.1
5 years ago