cancel
Showing results for 
Search instead for 
Did you mean: 

SERVER_CACHE_INVALIDATE?

dhorions
Contributor
0 Kudos

Hello,

I am trying to find a way to remove a certain item from the ICM server cache.

I want to use the following function :

<i><b>CL_HTTP_SERVER=>SERVER_CACHE_INVALIDATE( id = cache_id

type = 0

scope = 0 ).</b></i>

but I don't know how to find the cache key.

On this page (

http://help.sap.com/saphelp_webas620/helpdata/EN/38/2d453cf1fcc85ee10000000a11402f/content.htm)

it is explained.

<b>QUOTE :</b>

<i>The URL path is translated, that is, the encoded information about the SAP language and SAP theme, separated by & symbols, is added after the ICF path. This is then followed by another & symbol and the query string with the pseudo query parameters. To restrict the length of this string, a <b>hash process</b> is used on the query string.</i>

I would like to know how this <b>hash process</b> actually works?

Message was edited by: Dries Horions

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

It looks like the code for the hash process (and the reversal of this process) isn't coded in ABAP. It is all done in system calls to ICT. However you can access these functions using the class CL_HTTP_UTILITY. There is a DECODE_BASE64 and ENCODE_BASE64. If you are interested you probably want to look at program BSP_DECODE_URL. This shows you example code for pull parameters out of this encoded part of the URL.

dhorions
Contributor
0 Kudos

I looked at the ENCODE_BASE64 functions but it seems they give back a string that is much longer than the 8 character hash of the parameters that is used in the server cache of ICM.

So I think this is not really a solution to my problem.

Thank you anyway.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I don't think that the processing of the query string described in the help document is not the same thing that is taking place to the URLs in your ICM Cache. This help refers to the URL mangling that takes place like the following:

kww-d15s.kimball.com/sap(bD1lbiZjPTA4OA==)/bc/bsp/sap ....

Whatever that ending part is, it is appended automatically. I have some code that forces some content into the cache:


cl_http_server=>server_cache_upload( url      = url
                                       response = cached_response ).

When I look at this in the Cache Monitor I see &en&&A6E90000& appended to the end of the URL. The &en& is for the language this object is intended for. I assume that items beginning with the &&& are not lanuage specific.

However I can also see that if I call the SERVER_CACHE_INVALIDATE method and wildcard the ID parameter with my URL + * it does properly clear my item. I don't know if this helps you out or not.

dhorions
Contributor
0 Kudos

Thank you very much.

I already tried this piece of code :

<i>t_entries = icm_ref->GET_CACHE_ENTRIES( ).

loop at t_entries into wa_entry where name cs '/sap/public/bsp/sap/z_lijst/lijst.htm' and valid = 'X'.

CL_HTTP_SERVER=>SERVER_CACHE_INVALIDATE( id = wa_entry-name

type = 0

scope = 0 ).

endloop.</i>

but your solution is better.

<i>If you tell me how to award you some points I sure will :-)</i>

Message was edited by: Dries Horions

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I believe to mark this thread as answered - it has be setup as a question. It doesn't appear to be one becase I don't see any of the little star icons next to anyone's names. Perhaps you can edit the original posting and change it to a question.

dhorions
Contributor
0 Kudos

It was marked as a question, but when you answered it I checked "this question is answered" .

So perhaps you already have the points?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Well just so it is marked as answered. I'm not that worried about the points.