Cache Manager : Save data to the cache memory

A very easy to use extension

This extension can write and read files from the cache memory.


Documentation


component_event (11)

Raised when the error as occurred.

message: Error message

component_event (12)

Raised when the saved file from the cache memory is read

tag: Tag of the file
output: Output filename

component_event (13)

Raised when the saved file from the cache memory is read

tag: Tag of the file
output: Output filename

component_method (36)

Save text data to the cache memory

text: Text data to save
tag: Tag of the text data

component_method (37)

Read text from the cache memory

tag: Tag of the text data
returns: Saved text data

component_method (39)

Removes saved text data from the cache memory

tag: Tag of the text data
returns: true if success

component_method (40)

Save the file to the cache memory

fileName: Path to read
outputName: Tag of the file

component_method (42)

Read the file from the cache memory

fileName: Path to save
outputName: Tag of the file

component_method (41)

Removes saved file from the cache memory

tag: Tag of the file
returns: true if success

component_set_get (8)

Returns the file type data of the value 2

component_set_get (9)

Returns the text type data of the value 1


Note

  • Do NOT save large files else they might be deleted in the lack of space

Download


Direct download : com.kumaraswamy.cachemanager.aix (8.9 KB)
Alternate link : Download



Open Source

Github : GitHub - XomaDev/Cache-Manager



Website: micode.vercel.app

3 Likes

Might be helpful to explain to developers what and where the "cache" is, and why, how and when this is extension would be useful for them to use in their projects?

1 Like

Yes, you can store data that in not used for the lifetime of the app, like instead of loading image from web again you could cache it, and next time if it exists we can load it, else the error FileNotFound occurs, so then you need to load it again from web.

Also, you could do temporary actions on file, instead of doing them in the non-cache storage.

Is it something like a clipboard? Or is it more of a memory range where the app's temporary variables are stored?

Clipboard?? :thinking:

Condition depends.

Does the programmer know what the clipboard and copying to the clipboard are?
Maybe I'll ask otherwise. Can the data that has been copied to the cache be used outside the application?

I think no. It can be used within the application.

Another useful extension, different from the others. :+1:

1 Like

component_set_get (8)

Returns the file type data of the value 2

component_set_get (9)

Returns the text type data of the value 1

I don't see any mention of a value 1 or value 2 in your description of the extension.

Please explain.

thank you for your contribution
did you also test the extension here in MIT App Inventor?

As you know, currently there are a few differences between Kodular and MIT App Inventor... MIT App Inventor already supports AndroidX libraries and some new annotations and does not support the old support libraires anymore...

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Hello Kumaraswamy

Looks like your extension could speed-up file handling. Where you say:

How can a developer quantify "large"? I think we need a means of verifying the space available.

Is it not dependent on android functions and its "smart" skills to delete unnecessary data? Is it predictable?

The format of the data saved event.


Yes I do, first I test here and also in Kodular.


Like there is no limit, like when the user deletes the cache memory using the app or anything, it will be deleted. Or may the system do the thing.

I dont know...