HelloBug0 commented on issue #3112:
URL: https://github.com/apache/apisix/issues/3112#issuecomment-751306315


   It's possible to create the object in function fetch_valid_cache in line 100.
   ```lua
   local function fetch_valid_cache(lru_obj, invalid_stale, item_ttl,
                                    item_release, key, version)
       local obj, stale_obj = lru_obj:get(key)
       if obj and obj.ver == version then
           return obj
       end
   
       if not invalid_stale and stale_obj and stale_obj.ver == version then
           lru_obj:set(key, stale_obj, item_ttl)
           return stale_obj
       end
   
       if item_release and obj then
           item_release(obj.val)
       end
   
       return nil
   end
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to