How do you set a maximum cache size using the .net library. I am unable to find this in the documentation. Thanks.
Can you please clarify your question? What cache size limit you mean? If you’re asking about limiting a total size of the “temp” folder - currently GroupDocs.Viewer doesn’t have such functionality, and it is very strange at all. For example, what the GroupDocs.Viewer should do, if maximum cache size is reached, and new document should be opened, which was not cached before?
There is a “RemoveOldEntries” method, which allows you to remove the obsolete cache, maybe you’re looking for this?
If you will have more questions please feel free to contact us.
OK, yea i already setup RemoveOldEntries to clear things out older than a certain time. Thanks.
the [“RemoveOldEntries” method] does not remove files in the ["\temp\S"] folder. These are files created by the Stream feature of the GroupDocs.Viewer.
The RemoveOldEntries currently only removes entries in the [processing] folder and the [cahce] folder. Can this be fixed to delete entries in [\S] folder as well?
I am rendering a lot of files from Streams.
Is there way to remove the files in the [\S] folder??? or have it autodelete the file after the stream is rendered?
I did likeu said in the screen added
var documentcache = new DocumentCache("~/GroupDocLicense/GroupDocs.Viewer.lic", “~/testfiles”);
documentcache.RemoveOldEntries(new TimeSpan(1, 2, 0));
but it does not delete the cache. I am using .net viewer 2.16.
please help…the cache is not deleting… please see attached code,.
I donwloaded your code, and everything is the same. Did the DLL change???
nothing is deleted.
BTW, i need it to remove thefile in the “S”, “Cache” and “Processing” folders.
The stream creates a new entry for the same file each time it is view. (a lot of junk file created fast)
I want to delete all files, or at least delete the stream file and all the temp files for the stream.
I need the RemoveOldEntries to delete files in the “S”, “Cache” and “Processing” folders.
Is this possible?
the folders get filled up fast…I view a few files and i got 240Megs of temp files.
This is not going to work for me. I need to remove all the temp files for the stream.
Nevermind. I got your code to work.
I was missing the Server.MapPath("~/testfiles").
thx much for all your help.
BTW, can you add a flag/feature to delete the specific cache files belonging to the current stream, when the view is done rendering the stream? it would be nice to have the stream temp files delete automatically when the stream is done rendering in the view.