CLAIMATE

Technical blog

How to Effectively Clear Cache in SAPUI5 for Immediate Code Reflection

created by DALL-E

Vlado Balko

26. 1. 2024

Development

Introduction:

In the realm of SAPUI5 application development, encountering issues with code changes not promptly reflecting on the Fiori launchpad is a common challenge. This blog post aims to guide you through the process of clearing cache effectively, which is essential when modifications in the SAPUI5 code are not immediately visible upon accessing the application via the launchpad.

Identifying the Problem:

Developers often face the issue of delayed or non-reflecting code changes in the Fiori launchpad after making updates in the gateway system. The root cause of this problem lies in caching mechanisms similar to browser cookies, where the old code gets cached, preventing the new code from being displayed on the launchpad.

Solution Approach:

The process begins with uploading SAPUI5 applications to the SAP Gateway system using the SE38 transaction, specifically the program /ui5/ui5_repository_load. Following the upload, it's crucial to manually clear all caches to ensure the launchpad accesses a fresh copy of the code.

Step-by-Step Cache Clearance Methods:

Programs to Delete Cache:

Navigate to Transaction SE38 and execute the following programs:

  • /ui2/delete_cache_after_imp

  • /ui2/invalidate_client_caches

  • /ui5/app_index_calculate (For recalculating app index, choose 'singleUI5 repository' tab, enter the app name, and execute)

  • /ui2/invalidate_global_caches (Note: Use with caution as it restructures the target mapping index for all apps for all users)

  • /ui5/del_odata_metadata_cache

T-codes for Cache Cleanup:

Execute these T-codes for comprehensive cache clearing:

  • Front-end cache: /n/iwfnd/cache_cleanup

  • Back-end cache: /n/iwbep/cache_cleanup

  • Global cache: /nsmicm (Navigate to HTTP Plugins -> Server Caches -> Invalidate globally)

  • Service cache: /n/iwfnd/maint_Services (Select the service, then Service implementation -> Cleanup cache)

Final Step:

After completing the cache clearance, clear the browser cookies and access the application from the launchpad. The changes made in the application should now reflect immediately in the Fiori launchpad.

Conclusion:

By following these steps, developers can ensure that their code changes in SAPUI5 applications are reflected without delay on the Fiori launchpad, enhancing the efficiency of the development process.

It was also published here:

https://medium.com/@vbalko/how-to-effectively-clear-cache-in-sapui5-for-immediate-code-reflection-41b5ad9fad65

Navigace

© 2023 CLAIMATE

Navigace

© 2023 CLAIMATE