Does JS.Class cache classes?

25 views
Skip to first unread message

Colour Blend

unread,
Feb 23, 2012, 5:58:41 PM2/23/12
to jsclass-users
I would love to know if the JS.Class caches the JavaScript files,
which i suspect it does. If so, i would love to know how to clear the
cache?

James Coglan

unread,
Feb 23, 2012, 6:14:36 PM2/23/12
to jsclas...@googlegroups.com
I doesn't cache anything. Any caching behaviour is a function of the platform you're running on. What problem are you having? 

Colour Blend

unread,
Feb 24, 2012, 6:01:56 AM2/24/12
to jsclass-users
Thanks for the response. I'm generating a PDF document from Crystal
Reports dynamically and caching it. I use JS.Class + Amplify + jQuery
to feed the report generator the parameters. Right now, i'm hard-
coding the values in the JS.Class and sending it to the generator to
provide me with the right PDF report. It seem that after i change the
values and re-execute the Ajax request it sends the old values. I
thought i was my Ajax caller, but looking into Firebug, i find out
that the JS.Class script that contains the values still holds the old
values.

I'll do a proper test and provide you with more information.

James Coglan

unread,
Feb 24, 2012, 6:12:15 AM2/24/12
to jsclas...@googlegroups.com
On 24 February 2012 11:01, Colour Blend <sampso...@gmail.com> wrote:
It seem that after i change the
values and re-execute the Ajax request it sends the old values. I
thought i was my Ajax caller, but looking into Firebug, i find out
that the JS.Class script that contains the values still holds the old
values.

Are you using JS.Packages to load your code? If so, what does it show in the console while the page is loading? 

Colour Blend

unread,
Feb 25, 2012, 3:14:07 AM2/25/12
to jsclass-users
Yes, i'm using JS.Packages. This is my output below;

Loading http://podahis.akth.com/MVVM/ModelView/Report/Poda.ReportViewerViewModel.js
GET http://podahis.akth.com/MVVM/ModelView/Report/Poda.ReportViewerViewModel.js

Loading http://podahis.akth.com/Content/Script/js/jsclass/min/core.js
GET http://podahis.akth.com/Content/Script/js/jsclass/min/core.js

Loading http://podahis.akth.com/MVVM/Model/Poda.Global.DB.js
GET http://podahis.akth.com/MVVM/Model/Poda.Global.DB.js

Loading http://podahis.akth.com/MVVM/Model/Report/Poda.ReportViewer.DB.js
GET http://podahis.akth.com/MVVM/Model/Report/Poda.ReportViewer.DB.js

Loading http://podahis.akth.com/MVVM/ModelView/Report/CreateReport/Poda.Report.js
GET http://podahis.akth.com/MVVM/ModelView/Report/CreateReport/Poda.Report.js

Loading http://podahis.akth.com/MVVM/ModelView/Report/ManageReport/Poda.FUReport.js
GET http://podahis.akth.com/MVVM/ModelView/Report/ManageReport/Poda.FUReport.js

Loading http://podahis.akth.com/MVVM/ModelView/Poda.FinancialUnit.js
GET http://podahis.akth.com/MVVM/ModelView/Poda.FinancialUnit.js

Loading http://podahis.akth.com/MVVM/ModelView/Poda.Framework.js
GET http://podahis.akth.com/MVVM/ModelView/Poda.Framework.js

Executing http://podahis.akth.com/Content/Script/js/jsclass/min/core.js
Executing http://podahis.akth.com/MVVM/Model/Poda.Global.DB.js
Executing http://podahis.akth.com/MVVM/Model/Report/Poda.ReportViewer.DB.js
Executing http://podahis.akth.com/MVVM/ModelView/Report/CreateReport/Poda.Report.js
Executing http://podahis.akth.com/MVVM/ModelView/Report/ManageReport/Poda.FUReport.js
Executing http://podahis.akth.com/MVVM/ModelView/Poda.FinancialUnit.js
Executing http://podahis.akth.com/MVVM/ModelView/Poda.Framework.js
Executing http://podahis.akth.com/MVVM/ModelView/Report/Poda.ReportViewerViewModel.js


The last javascript files is the one that contains the changed line of
code, but even after hit Ctrl + F5 on firefox a number of times, it
still maintains an old version of the script. But it finally reload
the script after a few more tries.

Thanks for helping out.

Anthony

unread,
Apr 2, 2012, 5:56:56 PM4/2/12
to jsclass-users
I have also had a ton of caching problems after using JS.Class. Often
I have to do the same thing: Shift/Ctrl-F5 over and over and over
until it works.

On Feb 25, 2:14 am, Colour Blend <sampson.or...@gmail.com> wrote:
> Yes, i'm using JS.Packages. This is my output below;
>
> Loadinghttp://podahis.akth.com/MVVM/ModelView/Report/Poda.ReportViewerViewMo...
> GEThttp://podahis.akth.com/MVVM/ModelView/Report/Poda.ReportViewerViewMo...
>
> Loadinghttp://podahis.akth.com/Content/Script/js/jsclass/min/core.js
> GEThttp://podahis.akth.com/Content/Script/js/jsclass/min/core.js
>
> Loadinghttp://podahis.akth.com/MVVM/Model/Poda.Global.DB.js
> GEThttp://podahis.akth.com/MVVM/Model/Poda.Global.DB.js
>
> Loadinghttp://podahis.akth.com/MVVM/Model/Report/Poda.ReportViewer.DB.js
> GEThttp://podahis.akth.com/MVVM/Model/Report/Poda.ReportViewer.DB.js
>
> Loadinghttp://podahis.akth.com/MVVM/ModelView/Report/CreateReport/Poda.Repor...
> GEThttp://podahis.akth.com/MVVM/ModelView/Report/CreateReport/Poda.Repor...
>
> Loadinghttp://podahis.akth.com/MVVM/ModelView/Report/ManageReport/Poda.FURep...
> GEThttp://podahis.akth.com/MVVM/ModelView/Report/ManageReport/Poda.FURep...
>
> Loadinghttp://podahis.akth.com/MVVM/ModelView/Poda.FinancialUnit.js
> GEThttp://podahis.akth.com/MVVM/ModelView/Poda.FinancialUnit.js
>
> Loadinghttp://podahis.akth.com/MVVM/ModelView/Poda.Framework.js
> GEThttp://podahis.akth.com/MVVM/ModelView/Poda.Framework.js
>
> Executinghttp://podahis.akth.com/Content/Script/js/jsclass/min/core.js
> Executinghttp://podahis.akth.com/MVVM/Model/Poda.Global.DB.js
> Executinghttp://podahis.akth.com/MVVM/Model/Report/Poda.ReportViewer.DB.js
> Executinghttp://podahis.akth.com/MVVM/ModelView/Report/CreateReport/Poda.Repor...
> Executinghttp://podahis.akth.com/MVVM/ModelView/Report/ManageReport/Poda.FURep...
> Executinghttp://podahis.akth.com/MVVM/ModelView/Poda.FinancialUnit.js
> Executinghttp://podahis.akth.com/MVVM/ModelView/Poda.Framework.js
> Executinghttp://podahis.akth.com/MVVM/ModelView/Report/Poda.ReportViewerViewMo...

James Coglan

unread,
Apr 2, 2012, 6:05:11 PM4/2/12
to jsclas...@googlegroups.com
On 2 April 2012 22:56, Anthony <draft...@gmail.com> wrote:
I have also had a ton of caching problems after using JS.Class. Often
I have to do the same thing: Shift/Ctrl-F5 over and over and over
until it works.

Sorry I missed this thread. Try adding the following before loading your code:

JS.cacheBust = true;

This appends timestamps to URLs when requesting scripts, and should bypass the cache. 
Reply all
Reply to author
Forward
0 new messages