1. A code caching system comprising: a memory comprising instructions; and one or more processors configured to execute the instructions to: upon a cache miss in a resource cache: obtain first executable code compiled from primary source code awaiting execution; obtain second executable code compiled from secondary source code referenced in the primary source code and selected based on one or more of a size of the secondary source code or compile time of the secondary source code; serialize the first executable code and the second executable code into serialized code that is configured to be reconstructed in multiple execution contexts; store the serialized code, an object referenced in the selected secondary source code, an access method for accessing the object referenced in the selected secondary source code, and a type of the object as cached data in the resource cache, wherein the instructions cause the one or more processors to use the access method to access the cached object when a cache hit occurs for the cached object and when the type of the object matches an object type of a data access for the cache hit; obtain an execution history of the selected secondary source code; and replace the selected secondary source code with other secondary source code that has been more frequently executed than the selected secondary source code based on the execution history of the selected secondary source code.