#3307 [Core feature] Reuse same literals in the dynamic task
Pull request opened by
BarryWu0812
## Tracking issue
Closes
flyteorg/flyte#6032
## Why are the changes needed?
We should only serialize the variable and upload it once to reuse the same input.
To make the same Python value reuse the literal.
## What changes were proposed in this pull request?
Add a local cache to store the literal that has been serialized.
## How was this patch tested?
Unit test
## Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
https://bito.ai#summarystart|
### Summary by Bito
This pull request enhances the Flyte framework by implementing a local caching mechanism using an LRU cache for serialized literals, replacing the previous cache. This improvement boosts efficiency by reducing redundant serialization and uploads of identical Python values. A new unit test has been added to verify caching behavior when pandas is unavailable, and existing unit tests have been updated to ensure the new caching behavior is validated.
flyteorg/flytekit