Java-based1 distributed applications generally use RMI (Remote Method Invocation) for accessingremote objects. When used in a wide-area environment, the performance of such applications can be poor because of the high latency of RMI. This latency can be reduced by cachingob jects at the client node. However, the use of cachingin traduces other issues, includingthe expense of cachingthe object as well as the expense of managing the consistency of the object. This paper presents a middleware for object cachingin Java RMI-based distributed applications. The mechanisms used by the middleware are fully compatible with Java RMI and are transparent to the clients. Usingthis middleware, the system designer can select the caching strategy and consistency protocol most appropriate for the application. The paper illustrates the benefits of usingthese mechanisms to improve the performance of RMI applications.