Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. # Caching
  2. This can cache AJAX requests across page-loads with custom max-ages:
  3.  
  4. ```coffee
  5. FIVE_MINUTES = 5 * 60 * 1000
  6. App.Lib.Cache.promise().maxAge(FIVE_MINUTES).cache('/foo', -> $.get('/foo')).then (results) ->
  7. console.log results
  8. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement