You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by "Tore Halset (JIRA)" <ji...@apache.org> on 2009/06/17 22:26:07 UTC

[jira] Created: (JCS-58) disc file cache

disc file cache
---------------

                 Key: JCS-58
                 URL: https://issues.apache.org/jira/browse/JCS-58
             Project: JCS
          Issue Type: New Feature
    Affects Versions: jcs-1.3
            Reporter: Tore Halset
            Assignee: Aaron Smuts
             Fix For: jcs-1.4-dev


It would be nice to have a file based cache in jcs where each item is stored as a single file and the filename is based on the key. This way, several jvms can share the same cache and the cache can be rsynced between nodes while running the application. 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


RE: [jira] Commented: (JCS-58) disc file cache

Posted by Tim Cronin <Ti...@autonomy.com>.
>It simply replaces all strange characters and spaces with underscores.


Why spaces if the os supports it or even strange chars if the os
supports non ascii encodings?

You can end up causing collisions with that type of replace.

-----Original Message-----
From: Aaron Smuts (JIRA) [mailto:jira@apache.org] 
Sent: Monday, October 26, 2009 3:53 PM
To: jcs-dev@jakarta.apache.org
Subject: [jira] Commented: (JCS-58) disc file cache


    [
https://issues.apache.org/jira/browse/JCS-58?page=com.atlassian.jira.plu
gin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770189#act
ion_12770189 ] 

Aaron Smuts commented on JCS-58:
--------------------------------

Please send questions like this to the mailing list.  

Read the documentation.  This disk cache is like any other.  You
configure JCS to use it in the cache.ccf file just like any other disk
cache.  

If you want to create files outside of JCS, we'll have to expose a
utility for creating the names.  The algorithm is simply though.  It
simply replaces all strange characters and spaces with underscores.  

Please post to the user mailing list.

> disc file cache
> ---------------
>
>                 Key: JCS-58
>                 URL: https://issues.apache.org/jira/browse/JCS-58
>             Project: JCS
>          Issue Type: New Feature
>    Affects Versions: jcs-1.3
>            Reporter: Tore Halset
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>         Attachments: DiskFileCache.java, DiskFileCacheAttributes.java,
DiskFileCacheFactory.java
>
>
> It would be nice to have a file based cache in jcs where each item is
stored as a single file and the filename is based on the key. This way,
several jvms can share the same cache and the cache can be rsynced
between nodes while running the application. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


[jira] Commented: (JCS-58) disc file cache

Posted by "Chopin Hu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769968#action_12769968 ] 

Chopin Hu commented on JCS-58:
------------------------------

Figured out how to use it.   Thanks.

> disc file cache
> ---------------
>
>                 Key: JCS-58
>                 URL: https://issues.apache.org/jira/browse/JCS-58
>             Project: JCS
>          Issue Type: New Feature
>    Affects Versions: jcs-1.3
>            Reporter: Tore Halset
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>         Attachments: DiskFileCache.java, DiskFileCacheAttributes.java, DiskFileCacheFactory.java
>
>
> It would be nice to have a file based cache in jcs where each item is stored as a single file and the filename is based on the key. This way, several jvms can share the same cache and the cache can be rsynced between nodes while running the application. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


[jira] Closed: (JCS-58) disc file cache

Posted by "Aaron Smuts (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron Smuts closed JCS-58.
--------------------------

    Resolution: Fixed

I added a 1.4 version of a FileDiskCache into JCS.

> disc file cache
> ---------------
>
>                 Key: JCS-58
>                 URL: https://issues.apache.org/jira/browse/JCS-58
>             Project: JCS
>          Issue Type: New Feature
>    Affects Versions: jcs-1.3
>            Reporter: Tore Halset
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>         Attachments: DiskFileCache.java, DiskFileCacheAttributes.java, DiskFileCacheFactory.java
>
>
> It would be nice to have a file based cache in jcs where each item is stored as a single file and the filename is based on the key. This way, several jvms can share the same cache and the cache can be rsynced between nodes while running the application. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


[jira] Updated: (JCS-58) disc file cache

Posted by "Tore Halset (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tore Halset updated JCS-58:
---------------------------

    Attachment: DiskFileCacheFactory.java
                DiskFileCacheAttributes.java
                DiskFileCache.java

> disc file cache
> ---------------
>
>                 Key: JCS-58
>                 URL: https://issues.apache.org/jira/browse/JCS-58
>             Project: JCS
>          Issue Type: New Feature
>    Affects Versions: jcs-1.3
>            Reporter: Tore Halset
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>         Attachments: DiskFileCache.java, DiskFileCacheAttributes.java, DiskFileCacheFactory.java
>
>
> It would be nice to have a file based cache in jcs where each item is stored as a single file and the filename is based on the key. This way, several jvms can share the same cache and the cache can be rsynced between nodes while running the application. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


[jira] Commented: (JCS-58) disc file cache

Posted by "Chopin Hu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769351#action_12769351 ] 

Chopin Hu commented on JCS-58:
------------------------------

Aaron,

Great.   I just got a chance to check out the release-1.3.3.5-RC, which looks the Disk File Cache   

Now, my question is how to cache a file to the disk using a key as the file name.    Is this a config issue?    If not, can you please provide a sample code showing how to use it?

Thank you so much.

> disc file cache
> ---------------
>
>                 Key: JCS-58
>                 URL: https://issues.apache.org/jira/browse/JCS-58
>             Project: JCS
>          Issue Type: New Feature
>    Affects Versions: jcs-1.3
>            Reporter: Tore Halset
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>         Attachments: DiskFileCache.java, DiskFileCacheAttributes.java, DiskFileCacheFactory.java
>
>
> It would be nice to have a file based cache in jcs where each item is stored as a single file and the filename is based on the key. This way, several jvms can share the same cache and the cache can be rsynced between nodes while running the application. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


[jira] Commented: (JCS-58) disc file cache

Posted by "Chopin Hu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770179#action_12770179 ] 

Chopin Hu commented on JCS-58:
------------------------------

Aaron,

I am still not getting it right. Seems that I put an ascii file into the file disk as a separate file. But when it is an binary file. It does not work. Though I set the jvm to a bigger size (1560MBs) to handle a 12 MBs binary file, it still fails. Do you have an sample code to show how to make it work? If you need, I can send you a copy of the binary file I used for testing.

Thanks.

> disc file cache
> ---------------
>
>                 Key: JCS-58
>                 URL: https://issues.apache.org/jira/browse/JCS-58
>             Project: JCS
>          Issue Type: New Feature
>    Affects Versions: jcs-1.3
>            Reporter: Tore Halset
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>         Attachments: DiskFileCache.java, DiskFileCacheAttributes.java, DiskFileCacheFactory.java
>
>
> It would be nice to have a file based cache in jcs where each item is stored as a single file and the filename is based on the key. This way, several jvms can share the same cache and the cache can be rsynced between nodes while running the application. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


[jira] Commented: (JCS-58) disc file cache

Posted by "Aaron Smuts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765724#action_12765724 ] 

Aaron Smuts commented on JCS-58:
--------------------------------

Use the latest temp build.  It's production ready.  I'm using it in prod.  You don't need a formal release build.  1.3 is way out of date.  We'll issue a new release in a couple of months, but there is no need to wait.

> disc file cache
> ---------------
>
>                 Key: JCS-58
>                 URL: https://issues.apache.org/jira/browse/JCS-58
>             Project: JCS
>          Issue Type: New Feature
>    Affects Versions: jcs-1.3
>            Reporter: Tore Halset
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>         Attachments: DiskFileCache.java, DiskFileCacheAttributes.java, DiskFileCacheFactory.java
>
>
> It would be nice to have a file based cache in jcs where each item is stored as a single file and the filename is based on the key. This way, several jvms can share the same cache and the cache can be rsynced between nodes while running the application. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


[jira] Commented: (JCS-58) disc file cache

Posted by "Aaron Smuts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720884#action_12720884 ] 

Aaron Smuts commented on JCS-58:
--------------------------------

This might be useful for regions without many items.  I'll work on something based on the ideas here.  But the patch is not usable as it.  It depends on JDK 1.5 specific classes.  JCS is compatible with JDK 1.4.  

A few minor things for future reference: All methods need full comments.  All methods need unit tests.  Everything should be formatted according to our style.

Thanks for idea.  

> disc file cache
> ---------------
>
>                 Key: JCS-58
>                 URL: https://issues.apache.org/jira/browse/JCS-58
>             Project: JCS
>          Issue Type: New Feature
>    Affects Versions: jcs-1.3
>            Reporter: Tore Halset
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>         Attachments: DiskFileCache.java, DiskFileCacheAttributes.java, DiskFileCacheFactory.java
>
>
> It would be nice to have a file based cache in jcs where each item is stored as a single file and the filename is based on the key. This way, several jvms can share the same cache and the cache can be rsynced between nodes while running the application. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


[jira] Commented: (JCS-58) disc file cache

Posted by "Chopin Hu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770178#action_12770178 ] 

Chopin Hu commented on JCS-58:
------------------------------

Aaron,

I am still not getting it right.   Seems that I put an ascii file into the file disk as a separate file.   But when it is an binary file.   It does not work.    Though I set the jvm to a bigger size (1560MBs) to handle a 12 MBs binary file, it still fails.   Do you have an sample code to show how to make it work?   If you need, I can send you a copy of the binary file I used for testing.

Thanks.

> disc file cache
> ---------------
>
>                 Key: JCS-58
>                 URL: https://issues.apache.org/jira/browse/JCS-58
>             Project: JCS
>          Issue Type: New Feature
>    Affects Versions: jcs-1.3
>            Reporter: Tore Halset
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>         Attachments: DiskFileCache.java, DiskFileCacheAttributes.java, DiskFileCacheFactory.java
>
>
> It would be nice to have a file based cache in jcs where each item is stored as a single file and the filename is based on the key. This way, several jvms can share the same cache and the cache can be rsynced between nodes while running the application. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


[jira] Commented: (JCS-58) disc file cache

Posted by "Aaron Smuts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770189#action_12770189 ] 

Aaron Smuts commented on JCS-58:
--------------------------------

Please send questions like this to the mailing list.  

Read the documentation.  This disk cache is like any other.  You configure JCS to use it in the cache.ccf file just like any other disk cache.  

If you want to create files outside of JCS, we'll have to expose a utility for creating the names.  The algorithm is simply though.  It simply replaces all strange characters and spaces with underscores.  

Please post to the user mailing list.

> disc file cache
> ---------------
>
>                 Key: JCS-58
>                 URL: https://issues.apache.org/jira/browse/JCS-58
>             Project: JCS
>          Issue Type: New Feature
>    Affects Versions: jcs-1.3
>            Reporter: Tore Halset
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>         Attachments: DiskFileCache.java, DiskFileCacheAttributes.java, DiskFileCacheFactory.java
>
>
> It would be nice to have a file based cache in jcs where each item is stored as a single file and the filename is based on the key. This way, several jvms can share the same cache and the cache can be rsynced between nodes while running the application. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


[jira] Commented: (JCS-58) disc file cache

Posted by "Chopin Hu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCS-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764043#action_12764043 ] 

Chopin Hu commented on JCS-58:
------------------------------

That is exactly what I am looking for.   But is the release 1.4 available yet?   I don't care to use JDK 1.5+.   that's not an issue to me and to my project.

Currently, I am evaluating JCS 1.3.   If I can put this feature (one key, and use the key as a filename for cache) into function with the version 1.3, it is great.   If not, then where to find the version JCS 1.4?

By the way, the files I am going to cache are binary data.   I hope it will work out.

Thanks a lot.

> disc file cache
> ---------------
>
>                 Key: JCS-58
>                 URL: https://issues.apache.org/jira/browse/JCS-58
>             Project: JCS
>          Issue Type: New Feature
>    Affects Versions: jcs-1.3
>            Reporter: Tore Halset
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>         Attachments: DiskFileCache.java, DiskFileCacheAttributes.java, DiskFileCacheFactory.java
>
>
> It would be nice to have a file based cache in jcs where each item is stored as a single file and the filename is based on the key. This way, several jvms can share the same cache and the cache can be rsynced between nodes while running the application. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org