Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8909725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:30:18+00:00 2026-06-15T03:30:18+00:00

For Lucene, we have a good toolbox like Luke to view, diagnose, edit etc.

  • 0

For Lucene, we have a good toolbox like Luke to view, diagnose, edit etc. Do we have similar tool (at least display) for EhCache (when we enable diskPersistent)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:30:20+00:00Added an answer on June 15, 2026 at 3:30 am

    I don’t know of any such tool, and the file format isn’t really specified or defined as API. Basically, EhCache writes serialized objects to the data and index files. You can read and display them if you access the files directly. To get you going, here is a program as a starting point:

      import java.io.ByteArrayInputStream;
      import java.io.EOFException;
      import java.io.FileInputStream;
      import java.io.ObjectInputStream;
      import java.io.RandomAccessFile;
      import java.lang.reflect.Field;
    
      import net.sf.ehcache.Element;
      import net.sf.ehcache.store.disk.DiskStorageFactory.DiskMarker;
    
      public class EhcacheViewer
      {
    
         public static void main( String[] args ) throws Exception
         {
            final RandomAccessFile data = new RandomAccessFile( "cache/my-cache.data", "r" );
            ObjectInputStream ois = new ObjectInputStream( new FileInputStream( "cache/my-cache.index" ) );
            try
            {
               while( true )
               {
                  Object key = ois.readObject();
                  DiskMarker marker = (DiskMarker) ois.readObject();
                  long pos = getPosition( marker );
                  int size = marker.getSize();
                  data.seek( pos );
                  byte[] value = new byte[size];
                  data.readFully( value );
                  ObjectInputStream ois2 = new ObjectInputStream( new ByteArrayInputStream( value ) );
                  Element element = (Element) ois2.readObject();
                  System.out.println( "Element: " + element );
               }
            }
            catch( EOFException e )
            {
               // ...
            }
            ois.close();
            data.close();
         }
    
         private static long getPosition( DiskMarker marker ) throws Exception
         {
            Field field = marker.getClass().getDeclaredField( "position" );
            field.setAccessible( true );
            return (Long) field.get( marker );
         }
    
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Lucene Index on a central file system. In my IIS application,
I have a Lucene index that contains documents that have a type field, this
I have a lucene index I am trying to do a wildcard search. In
I have a Lucene index which is currently case sensitive. I want to add
I have implemented lucene for my application and it works very well unless you
I have a working Lucene index supporting a suggestion service. When a user types
I have some code using Lucene that leaves the default conjunction operator as OR,
I have a problem with Lucene's scoring function that I can't figure out. So
I have this question relating to Lucene. I have a form and I get
I have some code that deletes and rebuilds a Lucene index if it is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.