# HG changeset patch # User Michael Van De Vanter # Date 1389921830 28800 # Node ID f150a67b99e310dc8fb90cb66bbcb80fe206d922 # Parent 434b86962d0d5a1d52f7709892ac43d51ae2dfb6 Truffle: SourceManager documentation concerning file caching diff -r 434b86962d0d -r f150a67b99e3 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/source/SourceManager.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/source/SourceManager.java Thu Jan 16 16:43:56 2014 -0800 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/source/SourceManager.java Thu Jan 16 17:23:50 2014 -0800 @@ -33,7 +33,7 @@ * A representation of source code information, suitable for hash table keys with equality defined * in terms of content. There are three kinds of sources supported at present. * + *

+ * Cache: + *

    + *
  1. Access to source file contents via {@link Source#getInputStream()} or + * {@link Source#getReader()} does not by itself result in the file's contents being cached + * in the {@link Source} object.
  2. + *
  3. Access to source file contents via {@link Source#getCode()} or any other {@link Source} + * methods related to file's contents will result in the contents being cached in the + * {@link Source} object.
  4. + *
  5. Once source file contents have been cached, access to source file contents via + * {@link Source#getInputStream()} or {@link Source#getReader()} will be provided from the cache.
  6. + *
  7. Any access to source file contents via the cache will result in a timestamp check and + * possible cache reload.
  8. + *
*/ public final class SourceManager {