# Code Review: LoadCache

**URL:** <https://www.ruby-forum.com/t/code-review-loadcache/138326>\
**Category:** IronRuby\
**Created:** [May 22, 2008, 2:20am UTC](https://www.ruby-forum.com/t/code-review-loadcache/138326 "2008-05-22T02:20:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grujildo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Post date:** [May 22, 2008, 2:20am UTC](https://www.ruby-forum.com/t/code-review-loadcache/138326/1 "2008-05-22T02:20:27Z")

</div>

tfpt review /shelveset:LoadCache;REDMOND\tomat

Implements a simple load cache. Kernel#require uses relative paths to  
determine whether a file has already been loaded. One file required from  
multiple different directories using relative paths may therefore run  
multiple times. We still need to run it multiple times but we need to  
compile it only once unless the file content changed. This shelveset  
introduces a very simple load cache. It doesn’t check timestamps of the  
files for now, so if the file is modified it won’t load the new content.  
The cache is also not using weak references, so it leaks memory. Will  
revisit both issues post RailsConf.

Tomas
