@guillermocorrea/cacheable
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@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}`);
  }
}

Package Sidebar

Install

npm i @guillermocorrea/cacheable

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

31.9 kB

Total Files

24

Last publish

Collaborators

  • guillermocorrea