<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>نوشته های Navid fiIsaraee</title>
        <link>https://virgool.io/feed/@nfilsaraee</link>
        <description></description>
        <language>fa</language>
        <pubDate>2026-06-21 15:52:56</pubDate>
        <image>
            <url>https://files.virgool.io/upload/users/33954/avatar/omf8eN.png?height=120&amp;width=120</url>
            <title>Navid fiIsaraee</title>
            <link>https://virgool.io/@nfilsaraee</link>
        </image>

                    <item>
                <title>ردیس Redis</title>
                <link>https://virgool.io/@nfilsaraee/%D8%B1%D8%AF%DB%8C%D8%B3-redis-dnvdukbc6es9</link>
                <description>RedisShort DocumentWhat ?An In Memory DatabaseWhy ?Need for SpeedHow ?Store Key-Value data in memory for much faster accessWhen ?Caching data in high demandLarge data crawlingSearchingTemporary informationWho ?Backend developers, duh !How To ?I.Set a key and a value based on built-in data types (SET, LPUSH,..)II.Get stored value by providing keyIII.Possibly set a expiry timer in order to limit the storage shortageIV.To limit access of bad people create users and set certain rule via ACL commands (ACL SETUSER … )V. If your data is really important usingtransaction. (MULTI)VI. Finally Backup configs and all database cause you know RAM, if you lose power, stored data and configs will be lost.Which ?Open SourceTCP connectionWritten in ANSI-C , Scripting via LuaMost of commands happens synced (Create a lock)Few happens async (FLUSH, BGSAVE, UNLINK, …)What if …You want more than a simple key-value(data-types)?String&gt; SET &lt;key&gt; &lt;value&gt; (EX : &lt;seconds&gt; ,PX : &lt;miliseconds&gt;)&gt; GET &lt;key&gt;List : order is insertion&gt; LPUSH &lt;key&gt; &lt;value&gt; :key is a list and will append to head&gt; RPUSH &lt;key&gt; &lt;value&gt;:key is a list and will append to tail&gt; LRANGE &lt;key&gt; &lt;int:start&gt; &lt;int:end&gt; : get list by indexSet : unordered , unique&gt; SADD &lt;key&gt; &lt;member&gt;&gt; SMEMBERS &lt;key&gt; : get setHash : maps between string fields and string values&gt; HSET&gt; HGETSorted set : ordered by score, unique like setBitmap : Sting based with certain semantic to store imageHyperLogLogs: Sting based with certain semanticCustom-DataType: You can create a custom data semantic ….You are a team inside a company (authentication)?&gt; ACL (parameters) :access control listList : show list of usersGetUser &lt;username&gt; : user paramsSetUser &lt;username&gt; : create or update a useron / off : enable of disable a user (default = off)					&gt;&lt;password&gt; : add a new password to user						&lt;&lt;password&gt; : remove this password if exists						+&lt;command&gt; : add ability to use a specific command&gt; Auth &lt;username&gt; &lt;password&gt; : Well Signing up ...You have multiple apps but one RAM ?&gt; SELECT &lt;index&gt; : chose from 15 different db, like namespaces, same thing just separated !You are tired of a key (delete) ?&gt; DEL : delete a key&gt; UNLINK : delete a key&gt; EXISTS &lt;key&gt; &lt;key&gt; ...  : check if a key is present (returns int : 0 not found , 1 or more means number of given keys that were available)You need ACID ?&gt; MULTI : will create a queue of commands, So they will all execute correctly , or if error occurs none of them.&gt; EXEC :will execute given queue&gt; DISCARD : ifyou just not in the mood and want out …You want ensourance (Backup)?&gt; SAVE : will save whole database in a file [sync]&gt; BGSAVE : will save whole database in a file [Async]&gt; LASTSAVE : check the unix time of last successful backup&gt; CONFIG GET dir :get directory of saved filesYou are a big boy (mass data insertion)?User pipe mode to feed data into redis db like so :$ cat data.txt | redis-cli –pipeThe text should include redis protocol in order to parse file in ASCII format&quot;*3\r\n$3\r\nSET\r\n$3\r\nGreeting\r\n$5\r\nHello\r\n&quot;Which translates to :&gt;SET Greeting HelloYou are board ?&gt; LOLWUT : will show you cheer you upYou are mad (want everything gone) ?&gt;FLUSHALL : removes all keys everywhere …&gt;FLUSHDB :removes all keys in selected db(1-15)…You want more ?Simple my friend, go visit Redis Commandsfor much more information and in depth explanations.OH Wait …INSTALATION :$ Sudo apt install redis 	( Job Done ! )I’d be sad if you try this in command line cause it doesn’t work :(((</description>
                <category>Navid fiIsaraee</category>
                <author>Navid fiIsaraee</author>
                <pubDate>Tue, 19 Jan 2021 22:06:01 +0330</pubDate>
            </item>
            </channel>
</rss>