重庆小潘seo博客

当前位置:首页 > 重庆网络营销 > 小潘杂谈 >

小潘杂谈

redis源码多少行

时间:2020-09-22 23:20:08 作者:重庆seo小潘 来源:
redis全称REmote DIctionary Server,是一个由Salvatore Sanfilippo写的高性能key-value存储系统,其完全开源免费,遵守BSD协议。Redis与其他key-value缓存产品(如memcache)有以下几个特点。 + Redis支持数据的持久化,可以将内存中的数据保存在磁盘中,重

redis全称REmote DIctionary Server,是一个由Salvatore Sanfilippo写的高性能key-value存储系统,其完全开源免费,遵守BSD协议。Redis与其他key-value缓存产品(如memcache)有以下几个特点。

+ Redis支持数据的持久化,可以将内存中的数据保存在磁盘中,重启的时候可以再次加载进行使用。

+ Redis不仅仅支持简单的key-value类型的数据,同时还提供list,set,zset,hash等数据结构的存储。

+ Redis支持数据的备份,即master-slave模式的数据备份。

redis源码多少行

Redis的性能极高且拥有丰富的数据类型,同时,Redis所有操作都是原子性的,也支持对几个操作合并后原子性的执行。另外,Redis有丰富的扩展特性,它支持publish/subscribe, 通知,key 过期等等特性。

Redis更为优秀的地方在于,它的代码风格极其精简,整个源码只有23000行,很有利于阅读和赏析!还在等什么呢?Start!

如何获取Redis源码?

redis是完全开源的,其源代码可以在直接在官网上获取(目前最新版本是3.2.5)。

Git获取:

源代码获取 git clone https://github.com/antirez/redis.git

linux端cd ... // 这里打开你存放redis的文件夹wget http://download.redis.io/releases/redis-3.2.5.tar.gztar zxvf redis-3.2.5.tar.gz此时,进入解压后的redis目录下的src文件夹,redis的所有源代码都存放在此。[root@VM_123_20_centos redis-3.2.5]# cd src/[root@VM_123_20_centos src]# lsMakefilecrc64.hmkreleasehdr.shredis-cli.osort.oMakefile.depcrc64.omulti.credis-sentinelsparkline.cadlist.cdb.cmulti.oredis-serversparkline.hadlist.hdb.onetworking.credis-trib.rbsparkline.oadlist.odebug.cnetworking.oredisassert.hsyncio.cae.cdebug.onotify.crelease.csyncio.oae.hdebugmacro.hnotify.orelease.ht_hash.cae.odict.cobject.crelease.ot_hash.oae_epoll.cdict.hobject.oreplication.ct_list.cae_evport.cdict.opqsort.creplication.ot_list.oae_kqueue.cendianconv.cpqsort.hrio.ct_set.cae_select.cendianconv.hpqsort.orio.ht_set.oanet.cendianconv.opubsub.crio.ot_string.canet.hfmacros.hpubsub.oscripting.ct_string.oanet.ogeo.cquicklist.cscripting.ot_zset.caof.cgeo.hquicklist.hsds.ct_zset.oaof.ogeo.oquicklist.osds.htesthelp.hasciilogo.hhelp.hrand.csds.outil.cbio.chyperloglog.crand.hsdsalloc.hutil.hbio.hhyperloglog.orand.osentinel.cutil.obio.ointset.crdb.csentinel.ovalgrind.supbitops.cintset.hrdb.hserver.cversion.hbitops.ointset.ordb.oserver.hziplist.cblocked.clatency.credis-benchmarkserver.oziplist.hblocked.olatency.hredis-benchmark.csetproctitle.cziplist.ocluster.clatency.oredis-benchmark.osetproctitle.ozipmap.ccluster.hlzf.hredis-check-aofsha1.czipmap.hcluster.olzfP.hredis-check-aof.csha1.hzipmap.oconfig.clzf_c.credis-check-aof.osha1.ozmalloc.cconfig.hlzf_c.oredis-check-rdbslowlog.czmalloc.hconfig.olzf_d.credis-check-rdb.cslowlog.hzmalloc.ocrc16.clzf_d.oredis-check-rdb.oslowlog.ocrc16.omemtest.credis-clisolarisfixes.hcrc64.cmemtest.oredis-cli.csort.c以上就是redis源码多少行的详细内容,更多请关注小潘博客其它相关文章!