[ 4 posts ]

Beta tester

  • Username: beta_tester
  • Joined: Thu Jun 28, 2012 1:37 pm
  • Posts: 4
  • Offline
  • Profile

Cache Plugin

Post Posted: Thu Jun 28, 2012 2:26 pm
+0-
How to modify the "cache module" so that we can insert custom functions to operate on cache data?

John Lindal

YUI Contributor

  • Username: jafl
  • Joined: Mon Nov 02, 2009 2:33 pm
  • Posts: 351
  • Location: Los Angeles, CA
  • Twitter: jafl5272
  • GitHub: jafl
  • Gists: jafl
  • Offline
  • Profile

Re: Cache Plugin

Post Posted: Mon Jul 02, 2012 8:02 am
+0-
Can you provide more details on what you need? When would the custom functions be invoked?

Beta tester

  • Username: beta_tester
  • Joined: Thu Jun 28, 2012 1:37 pm
  • Posts: 4
  • Offline
  • Profile

Re: Cache Plugin

Post Posted: Mon Jul 02, 2012 10:48 am
+0-
Im using DataSource.IO to "GET" JSON files. Instead of caching the 'data' I want to cache the 'url' of the JSON file.

How would I do this using the existing DataSourceCache Plugin?

EDIT: link to the js file :
http://yui.yahooapis.com/3.5.1/build/da ... e-cache.js

John Lindal

YUI Contributor

  • Username: jafl
  • Joined: Mon Nov 02, 2009 2:33 pm
  • Posts: 351
  • Location: Los Angeles, CA
  • Twitter: jafl5272
  • GitHub: jafl
  • Gists: jafl
  • Offline
  • Profile

Re: Cache Plugin

Post Posted: Tue Jul 03, 2012 7:42 am
+0-
DataSourceCache explicitly caches the responses. It uses the request as the key.

Saving the urls doesn't really sound like caching. It sounds more like history. If you really want something like DataSourceCache that stores only the urls, then I think you'll have to fork datasource-cache.js
  [ 4 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum