Skip to Content
avatar image
Former Member

How to clear cache after mime object is updated?

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 20, 2010 at 08:20 AM

    Hi Derek,

    Have you tried the method INVALIDATE_ICM_CACHE of class CL_MIME_REPOSITORY_API ?

    Regards,

    Anand

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      thank you,

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

      Many thanks again.

      😊