Return-Path: Delivered-To: apmail-jakarta-jcs-users-archive@www.apache.org Received: (qmail 86253 invoked from network); 23 Sep 2005 18:52:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Sep 2005 18:52:38 -0000 Received: (qmail 27630 invoked by uid 500); 23 Sep 2005 18:52:38 -0000 Delivered-To: apmail-jakarta-jcs-users-archive@jakarta.apache.org Received: (qmail 27476 invoked by uid 500); 23 Sep 2005 18:52:37 -0000 Mailing-List: contact jcs-users-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JCS Users List" Delivered-To: mailing list jcs-users@jakarta.apache.org Received: (qmail 27463 invoked by uid 99); 23 Sep 2005 18:52:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Sep 2005 11:52:37 -0700 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of Aaron.Smuts@travelocity.com designates 151.193.220.19 as permitted sender) Received: from [151.193.220.19] (HELO sgtulmg02-out.sabre.com) (151.193.220.19) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Sep 2005 11:52:45 -0700 Received: from unknown (HELO sghdqbh02.Global.ad.sabre.com) ([10.12.64.4]) by sgtulmg02-out.sabre.com with ESMTP; 23 Sep 2005 13:52:15 -0500 X-ExtLoop1: From 10.12.64.4 X-IronPort-AV: i="3.97,141,1125896400"; d="scan'208"; a="574347320:sNHT99009648" Received: from sgtulmsp04.Global.ad.sabre.com ([10.12.64.107]) by sghdqbh02.Global.ad.sabre.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 23 Sep 2005 13:52:14 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Cache Size Date: Fri, 23 Sep 2005 13:52:14 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Cache Size Thread-Index: AcXAZ6ozVjQPwTylRNCs+mZ5cGMtBgAB9ZsA From: "Smuts, Aaron" To: "JCS Users List" X-OriginalArrivalTime: 23 Sep 2005 18:52:14.0886 (UTC) FILETIME=[E9F33460:01C5C06F] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N There is no method to get the size in bytes. You can only approximate. The admin bean used by the JCSAdmin.jsp writes the objects to a counting output stream to get a rough idea of how much memory a region is using, but there is no way to configure the cache to limit the size in bytes of a region. There is no way to accurately determine how much memory an object takes, at least no way to get close that would not be too expensive to use. We could put some limits on the cache using the memory size fuctions available in the System class in jdk1.4, but this still wouldn't give you the control you want. Aaron > -----Original Message----- > From: Hoying, Ken [mailto:KHoying@tiaa-cref.org] > Sent: Friday, September 23, 2005 1:53 PM > To: jcs-users@jakarta.apache.org > Subject: Cache Size >=20 >=20 > I am trying to tune my cache settings. In particular the number of > objects that I want to allow in the cache. I would like to determine how > large my cache is in bytes while debugging so that I can set the max > number of elements in the cache appropriately. The API seems to indicate > that I can get the size of an item in the cache with the getSize() method. > However, this is not working for me. I always get 0. What am I doing > wrong? >=20 > BTW.. I am using the LRUMemoryCache. >=20 > Thanks in advance, > Ken >=20 >=20 > ************************************************************** > This message, including any attachments, contains confidential information > intended for a specific individual and purpose, and is protected by law. > If you are not the intended recipient, please contact sender immediately > by reply e-mail and destroy all copies. You are hereby notified that any > disclosure, copying, or distribution of this message, or the taking of any > action based on it, is strictly prohibited. > TIAA-CREF > ************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org For additional commands, e-mail: jcs-users-help@jakarta.apache.org