cancel
Showing results for 
Search instead for 
Did you mean: 

How to clear cache after mime object is updated?

Former Member
0 Kudos

Hi Expert,

I create a mime object (such as "test1.jpg") in mime repository.

In web dynpro, I add two UI elements: a formatted text edit and a File-Upload "Insert Image",

after I click the File-Upload "Insert Image",

I select an image file (such as test2.jpg) from local directory, and upload the content of the image file to mime object(test1.jpg) in mime repository.

at the same time, I insert a line into formatted-text-edit as "<img src="/SAP/Public/.../test1.jpg" />".

I double click the mime object (test1.jpg), its content has changed as test2.jpg,

however, formatted-text-edit still displays the content of test1.jpg.

When I mannually clear the cache of IE, and refresh the web, Formatted-text-edit display the content of test2.jpg.

It's obvious that the cache of http server isn't cleared.

How to clear cache after mime object is updated?

Any suggestions are welcomed.

Thank you.

Best Regards,

Derek

P.S. the source code:

lv_url = '/SAP/BC/WebDynpro/SAP/ZENHANCE_IA/test1.jpg'.

lo_mine_rep = cl_mime_repository_api=>get_api( ).

lo_mine_rep->put(

EXPORTING

i_url = lv_url

i_content = lv_file_string ).

Edited by: Derek Zhao on Sep 20, 2010 6:21 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Derek,

Have you tried the method INVALIDATE_ICM_CACHE of class CL_MIME_REPOSITORY_API ?

Regards,

Anand

Former Member
0 Kudos

thank you,

i have solved the problem, through: right click the mime object --> disable cache,

Many thanks again.