Hi,
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. Thanks, Best Regards, Ramya Karri On Mar 23, 5:34 pm, joshua <josh...@gmail.com> wrote: > Can I know how did you do it? > > > > On Tue, Mar 24, 2009 at 8:18 AM, RamyaK_CS <karri.ra...@gmail.com> wrote: > > > Hi > > > Need some help > > > I have cached an javascript, how can I use it in the view. > > > I used $javascript->link() function, but it is looking in /app/webroot/ > > js folder. Instead I want to get the script from cache. > > > Is there any way we can do it? > > > Best Regards, > > Ramya > > -- > Thanks > Joshua --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---