--- title: "Storage Block" slug: "storage-block" updated: 2021-08-14T14:47:58Z published: 2021-08-14T14:47:59Z canonical: "help.pillir.io/storage-block" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.pillir.io/llms.txt > Use this file to discover all available pages before exploring further. # Storage Block Storage options are explained as below: It is of two types: Session Storage and Persistent Storage. - Session Storage consists of SetItem, GetItem, RemoveItem, Clear Session. - Persistent Storage consists of GetItem, SetItem, RemoveItem ## Session Storage: ##### ### Get Item    GetItem is used to fetch a particular Key-value placed within a storage variable.  | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | Name or Key in Text | Returns the value of any type. | ![](https://lh6.googleusercontent.com/FxY6XfbVRS5RJxH1V8ML0kWtx3G2Q-PWkCq9EbO7Hpt8jDy5_BS9XvK-AFl7xpi_XKvjE-6am1yz1XrLBD5Bi2DMrRq3a47PVhDY0XJPPEQBc91sx3ulwcFhv4_UCawvtXicwVtn) | ```javascript pillirFunctions. session_storage_get ('key', value) ``` | ##### ### Set Item    Set Item is used to set a particular key-value pair to a particular variable.  | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | Name or Key in Text, Value any type | Store the key-value pair to the session storage. | ![](https://lh4.googleusercontent.com/sxvGDmbe26xBpgQGKj9jxR8wmzYHj2ifwzMdVJX-Bov8M53kwTCbVunVVC2oaNzpqRb6pcA8l4w3SH3n-nLHr5_Efr2vBs1E4WdXvApXWxeotXn_ax5d4bVteO2GUhizBW8Zxddu) | ```javascript pillirFunctions. set_session_variable ('key') ``` | ##### ### Remove Item    It is used to remove a particular item within the variable placed within the storage block.  | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | Name or Key in Text | Remove the key-value pair from session storage using the key. | ![](https://lh3.googleusercontent.com/p6nmqXoKV_yVZXx84uuyWMDAybe3gXnvN7nc6s3lpPtrjDYVstbnFrdDDPX-UzrGBoaigZYp_ku0b1368ZlRGrrnw8p6_z1MH2wiYAQKykOXrOSRYQ-9XRFjcv7DSxEfaX91XTEH) | ```javascript pillirFunctions. remove_session_variable ('key') ``` | ##### ### Clear Session    It is simply a trigger used to clear a particular session based on time or event trigger.  | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | | Removes all the session storage key-value pairs. | ![](https://lh3.googleusercontent.com/QkZql0-y2GOMNd0VxlaB10Q6edQq6aCJPPmk3QJ22WRMGaVOLAjkoRXUyS7KzAs-jzmgtEXnbbpnJlAEcKkIVsfJ-O6e9GzuRm6eGilJQ5cBzuNVhTtuMcys6wZdFatoJpLUf1kX) | ```javascript pillirFunctions. clear_all_session_variable() ``` | #### ## Persistent Storage: This is primarily done for local variables declared within the database. ### GetItem    This block is used to fetch a key-value pair from a local database.  | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | Name or Key in Text | Returns the value of any type. | ![](https://lh4.googleusercontent.com/YlhR76cq1C0890s_gL5Mi0aG1YcQMgbTFW29T3xPP9CC_7g5x-SVZW7APtzGkPV_iE6wz4VXRZMULOiP2Mn_B51l1TtaiIvCbzb5glnWUNK4OmRaUhsjfUFkSab0cd-33oh7hOqQ) | ```javascript pillirFunctions. local_storage_get ('key' , value) ``` | ##### ### SetItem    This block is used to set a key value to a particular local variable.  | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | Name or Key in Text, Value any type | Store the key-value pair to the local storage. | ![](https://lh5.googleusercontent.com/GRJIfmH28Xld3IEB7SjK_NNQF5mzBS6gMETYd4g5XPjQdPbbC-5p-MkhQbyin9xQpPssuI_jcF9ZglriesjTSLBvwz9donMdWgTsVoLOg-a_eG1XHzj8pryeawkfOEIWyNEmEceh) | ```javascript pillirFunctions. local_storage_get('key') ``` | ##### ### RemoveItem    This block is used to remove the existing key-value of a variable from the local storage.  | **Input** | **Output** | **Block Layout** | **Generated Code** | | --- | --- | --- | --- | | Name or Key in Text | Remove the key-value pair from local storage using the key. | ![](https://lh4.googleusercontent.com/HsvSa6TAxGEwzj9RXGeOTkGSqL9AAKftxKdS-as9GZczbrNOcJw3FXe3ezsV8AcyIy3eZSXoTb7Zk_0xyThQRqdv9nJExrKxvxsLpyCHHquBkc_dqXahnGLPaAkVPKwiFlm9juQ0) | ```javascript pillirFunctions. local_storage_remove('key') ``` |