fix package change caching #372

This commit is contained in:
sbcgua 2016-10-09 13:04:42 +02:00
parent bdabaccee6
commit ab982cd885
3 changed files with 7 additions and 3 deletions

View File

@ -28,6 +28,7 @@ TYPES: BEGIN OF ty_comment,
TYPES: BEGIN OF ty_item,
obj_type TYPE tadir-object,
obj_name TYPE tadir-obj_name,
devclass TYPE devclass,
END OF ty_item.
TYPES: BEGIN OF ty_file_item,

View File

@ -95,7 +95,8 @@ CLASS lcl_file_status IMPLEMENTATION.
ls_item-obj_name = lv_pre.
CLEAR lt_files.
LOOP AT lt_local ASSIGNING <ls_local> WHERE item = ls_item.
LOOP AT lt_local ASSIGNING <ls_local>
WHERE item-obj_type = ls_item-obj_type AND item-obj_name = ls_item-obj_name.
APPEND <ls_local>-file TO lt_files.
ENDLOOP.

View File

@ -418,11 +418,13 @@ CLASS lcl_repo IMPLEMENTATION.
ls_item-obj_type = <ls_tadir>-object.
ls_item-obj_name = <ls_tadir>-obj_name.
ls_item-devclass = <ls_tadir>-devclass.
IF mv_last_serialization IS NOT INITIAL. " Try to fetch from cache
READ TABLE lt_cache TRANSPORTING NO FIELDS
WITH KEY item = ls_item.
IF sy-subrc = 0 " There is something in cache and the object is unchanged
WITH KEY item = ls_item. " type+name+package key
" There is something in cache and the object is unchanged
IF sy-subrc = 0
AND abap_false = lcl_objects=>has_changed_since( is_item = ls_item
iv_timestamp = mv_last_serialization ).
LOOP AT lt_cache ASSIGNING <ls_cache> WHERE item = ls_item.