Hello

Need some help!!

I want to cache a dynamically created javaScript and use it from cache
in further requests.

i.e. I have a dynamic string, say, $data = 'document.write("hi")';

      I want to cache it as an external js, so I used the below
sentence.

        cache('views'. DS. 'test.js', $data, $expires);

    This successfully created test.js in my cache folder i.e. in the /
app/tmp/cache/views folder

Now I want to use this test.js file present in cache in my view page.

So when i use $javscript->link('test'); I get an error as the server
looks for the script in the /app/webroot/js folder.

Is there any way I can redirect the uri and use the js from cache?
i.e. tell the server to get the test.js from cache folder (/app/tmp/
cache/views/)

It would be great if someone can give some idea as to how to do this.

Thanks for the help,

Ramya



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to