on 2005 May 18 2:16 PM
Hi,
I want to have an infinite cache duration of some of my BSP pages. But I could only achieve maximum of one day (86400sec). How can I increase this setting ?
thanks in advance and excuse for posting here once more,
this may be the better group, following a hint from Raja
Wolfgang
You are in the right place now. Did you check the link which i have given.
Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try to set the caching "manually" within the OnInitialization.
Example:
response->set_header_field( name = 'Expires' value = 'Thu, 01 Dec 2020 00:00:00 GMT' ).
See also:
Hi to all responders,
Server caching is not the point, I want client side caching. I tried to switch a bsp containing javascript stateless, but it doesn't work. The URL of the page in cache always contents the mangling code like host:application(fvDEnkD==)/scripte/scripte.js
Is there a possibility to avoid this to get session-independent client caching ?
Ciao
Wolfgang
Hi Wolfgang,
my response was exacltly about the client-side caching.
However my method will not work for MIME objects (the script in your case unless it is generated dynamically).
Concernin your last question:
Caching is always done for the concrete URL. So in your case this is normal that the whole URL (including mangled part) is stored.
Could you please explain the problem more exactly.
Do you want to exclude the session information from the URL? - normally it is NOT in the URL unless you are using the sap-syscmd=nocookie option.
Also please see this thread regarding the MIME caching
Artem.
Wolfgang,
The answers from Artem has been 110% correct. They are worth reading once more. In principle put all of your JS script onto a BSP page. Then in OnInit method, first delete all the header fields from the response that says that the document should not be cached (see my weblog on handling on non-HTML documents). Then add the correct new headers to cache you page as you wish. And yes, we are talking about browser side caching. Artem has given you all the relevant references. (To build correct date sequences, look at cl_bsp_utility class!)
As for the mangling, there is usually no session-id in this string. See other weblog on this topic. This should not be a problem.
The alternative, maybe much better approach is to place JS into MIME repository. Use the right-mouse, then other functions, and the set the browser cache time of document to 7+ days. This documents can also be read (and will then be cached) without mangled URLs.
Hi, all,
thanks for your answers.
My remark about client side caching was an answer to Naresh, not to Artem.
I changed Artem's advice to:
<b>response->set_header_field( name = 'Cache-Control' value = 'max-age=1209600' ).</b>
and this works if I delete the browser cache time in the property sheet.
I tried the proposal with mime types too. It works, but if I do this I loose version management.
Mangled URL: I changed the path to an absolute one and I got 2 files in cache with mangling code. If I compress,
I got one small with and one large without mangling code.
Funny.
thanks to all.
Wolfgang
Hi Wolfgang
Check Profile paramter
icm/HTTP/server_cache_<xx>/expiration
Hope it helps
Regards
Naresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
57 | |
11 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.