Spring Boot | Spring Data Redis as Cache | @Cacheable | @CacheEvict | @CachePut | JavaTechie

  Рет қаралды 165,535

Java Techie

Java Techie

Күн бұрын

Пікірлер
@satyabatigoswami1735
@satyabatigoswami1735 9 ай бұрын
Learnt so much from your videos. You are very good teacher and a very good person!! Thanks a lot🙏
@sanketr6256
@sanketr6256 Жыл бұрын
very nice video and thanks for the content Basant
@zuberdiwan8123
@zuberdiwan8123 Жыл бұрын
Very Nice Tutorial sir...Very Well Explained...Thank You
@harshitgupta2872
@harshitgupta2872 2 жыл бұрын
Sir, where is the primary data database to store data in redis , you didn't connect to any data base (such as MongoDb) as primary database so that we use Redis as Cache
@NiteshSingh-tt8ex
@NiteshSingh-tt8ex 2 ай бұрын
Perfect explanation, I visit your tutorial for quick revision of concepts . Thank you!
@swagatrath2256
@swagatrath2256 6 ай бұрын
I have a little bit of confusion here.. The DB being used is Redis and caching is being done at the application level.. which also is using Redis? How do you configure which cache mechanism to be used then?
@user-wc4zn7ew7t
@user-wc4zn7ew7t 2 жыл бұрын
Thanks you @java techie, Your videos are very helpful for me. It made me learn Redis Basic in just few hours with example. thanks again appreciatable approach. 👍👌
@Javatechie
@Javatechie 2 жыл бұрын
Thanks buddy
@gopisambasivarao5282
@gopisambasivarao5282 Жыл бұрын
Appreciate your efforts Basant. God Bless you.😊🙏
@hrajiv29
@hrajiv29 2 жыл бұрын
Thanks for providing such a nice explanatory videos
@aidataverse
@aidataverse 3 жыл бұрын
very much useful appreciate your effort
@fuadgafarov
@fuadgafarov 3 жыл бұрын
Thanks, it will help in my career a lot. Great job. Keep going please.
@govardhanmopada1235
@govardhanmopada1235 3 жыл бұрын
Thank you for your videos... I learnt more from your videos. Very good explanation ❤️👌
@mahmoudodeh3534
@mahmoudodeh3534 4 жыл бұрын
Thank you for being teacher
@vivian1154
@vivian1154 Жыл бұрын
Redis serves a cache purpose primarily here already I believe. the cacheable annotation is to make the method cacheable by conditions to Java in memory. Is my understanding correct?
@Javatechie
@Javatechie Жыл бұрын
Yes correct
@mobinshah1
@mobinshah1 3 жыл бұрын
You are the best. No doubt
@CaponordRevHappy
@CaponordRevHappy 3 жыл бұрын
Nice one! very helpful.
@ihabson
@ihabson 2 жыл бұрын
Thank you for the video. I’m a newbie when it comes to cache, so is it possible to give more information about it. Like where is the data stored ? I guess it’s in the RAM but which one ? And what happens if the data changes in the mean time ? Does it mean that applications can possibly get an obsolete « snapshot » of the database because of caching ? Is that where the TTL comes handy ? Or is the « record » deleted from the cache if it changes ? Thank you very much
@deeplife9654
@deeplife9654 7 ай бұрын
Lolz. His video tutorials are for medium skilled developers to go to Advanced level
@sasi2182
@sasi2182 3 жыл бұрын
Where the cache data will be stored ...I think it’s in memory db... not stored in redis DB.....what if I have millions of records... will it stored in application itself??
@Javatechie
@Javatechie 3 жыл бұрын
No it won't store in application . Always it store in in memory cache
@sasi2182
@sasi2182 3 жыл бұрын
@@Javatechie no Basant it's storing in local only ,,,try with by up another instance of same application... Then if you hit request then it's going and hitting database
@phoneix24886
@phoneix24886 3 жыл бұрын
@@sasi2182 Hi sasi, so when we use @Cacheable it is storing data in memory of the application right?
@phoneix24886
@phoneix24886 3 жыл бұрын
@@sasi2182 My doubt just got clarified thanks to this gentleman - kzbin.info/www/bejne/Z5qvqmujaJh5jJo
@kvnagendra5354
@kvnagendra5354 2 жыл бұрын
Sir when we have devtool dependency in pom. And when we call findbyid there its throwing classcast exception..
@Javatechie
@Javatechie 2 жыл бұрын
findById now returning Optional please check it properly
@balamurali5127
@balamurali5127 3 жыл бұрын
I am getting error as Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
@A2ZZ555
@A2ZZ555 2 жыл бұрын
Bro resolve hua error apka
@KrishnaReddy-qb2jm
@KrishnaReddy-qb2jm 3 жыл бұрын
when you say get data from db? is it redis client or some sql db? because i see productdao getting data from redis. @Cacheable caches local memory?
@phoneix24886
@phoneix24886 3 жыл бұрын
I actually have the same question not clear here
@devang007
@devang007 3 жыл бұрын
Great video!!
@divyamahesh9032
@divyamahesh9032 9 ай бұрын
Hi basant I watched both the videos redis as db and redis as cache.In redis as cache video you are using redis as both db and cache . And also if we want we can replace db with any other one eg:oracle etc... Am i right???
@manishdadheech8440
@manishdadheech8440 4 жыл бұрын
I have small doubt Basant... here you are just configured Redis template in Redis configuration file then using cachable to cache product .. Here how spring comes to know that it needs to use Redis DB to cache data. Normally we need to implement spring interface Cache and CacheManager Then how it is working internally.
@Javatechie
@Javatechie 4 жыл бұрын
Because already we are using ResdisHasOps in our dao. Class and there we are persisting data into reddis server .
@ranjan098
@ranjan098 9 ай бұрын
Hi Basant bhai, Great tutorial !!! . is it possible to use Database as some other database but not Redis DB, and use Redis Cache to communicate between db and cache ?
@Javatechie
@Javatechie 9 ай бұрын
Yes it's possible but I need to check about configuration
@midhunma8875
@midhunma8875 6 ай бұрын
Hi Please let me know if you found any useful tutorials in this
@gauravk002
@gauravk002 2 жыл бұрын
Again an excellent video from Java Techie..
@bhavanisankar71
@bhavanisankar71 Жыл бұрын
Sir i applied cache for findAll() that time updated data not getting means after retrieving all data update and delete data not updating to findAll() getting previous data only how can i improve this problem
@satyabratasahoo967
@satyabratasahoo967 3 жыл бұрын
Thank you Basant bhai, can you please explain more on the master slave implementation of redis?
@nareshch6454
@nareshch6454 9 ай бұрын
simple and great videos!
@jewelchowdhury9752
@jewelchowdhury9752 3 жыл бұрын
First of all, thank you very much, sir. I have a question. I want to build a micro-service based e-commerce web application. suppose, I have some services, like customer service, product service(only contain Title and description and the image & price fetches IMG & price from another IMG service & price service), order service, and cart service. In my product service, It is possible when I have static data. and I have tried it. But my question is how can I add a new product record (with all fields) from the admin service(admin panel) into the multiple services like IMG service, product service(Title and description), price service? Please make a video on how to add records into multiple services at a time?
@Javatechie
@Javatechie 3 жыл бұрын
Yes we can share same data accros multiple service through Rest API call You can check my microservice first video from microservice playlist .you will get clarity on that
@jewelchowdhury9752
@jewelchowdhury9752 3 жыл бұрын
@@Javatechie thank you sir
@amansinha3629
@amansinha3629 Жыл бұрын
How to specify key in the cacheable method if the method has no parameter?
@Javatechie
@Javatechie Жыл бұрын
Specify default #id
@nikp7743
@nikp7743 Жыл бұрын
Прикольно что индусы даже не стараются говорить без акцента)
@kks___
@kks___ 4 жыл бұрын
Sir first of all Thank you so much for your All Video 🙏 Sir a request to you please make a video on jwt token blacklisting before expires and refresh token please please it’s my humble request .
@Javatechie
@Javatechie 4 жыл бұрын
Okay sure I will try this
@sathiskumarp
@sathiskumarp 2 жыл бұрын
Thanks for the video. I have an order service and payment service, based on the payment service response I have to commit the value to DB. So whether it is possible to maintain the update operation in cache as an intermediate and once the payment is confirmed we can commit to actual DB.
@Javatechie
@Javatechie 2 жыл бұрын
No Satish cache will work behind the db. So if you update on db then it will reflect on cache not reverse
@sathiskumarp
@sathiskumarp 2 жыл бұрын
@@Javatechie Thanks for your response
@SP-yh5op
@SP-yh5op Жыл бұрын
Thanks for your making concepts easier. @Java Techie Is it good idea to have 1 utility micro service for Radis caching or having in all 10+ persist micro services configured with redis interactions. We have like 100+ micro services with Kafka streaming.
@sudhirkk007
@sudhirkk007 2 жыл бұрын
same code I trying with Azure redis its not working , getting jedis connection exception
@manirsg9641
@manirsg9641 4 жыл бұрын
I am wondering that, how this caching working without redis instance? We can use redis docker image for this work
@Javatechie
@Javatechie 4 жыл бұрын
Yes already I up my redis server , please checkout my previous tutorial. In config I provided host and port of reddis instance and up it .
@pushpamitdon
@pushpamitdon 3 жыл бұрын
Informative video but I've a query. What is the difference between caching using @Cacheable and caching via RedisTemplate. Are these records not available in Redis DB if we cache via @Cacheable?
@imshaggy619
@imshaggy619 Жыл бұрын
How can I store the cached data into any file and get the data from that file when required in code
@Javatechie
@Javatechie Жыл бұрын
Then why do you need cache?
@imshaggy619
@imshaggy619 Жыл бұрын
@@Javatechie it's a large number of values , big table. So what will be the easier approach to get those as needed without a DB hit everytime. Like a lookup service for the cache - lookup.getValue(key)
@pamuletip5054
@pamuletip5054 3 жыл бұрын
What is the maven dependencies that we have to keep for redis??
@Javatechie
@Javatechie 3 жыл бұрын
Go to video description and checkout my GitHub link
@veerraju8445
@veerraju8445 4 ай бұрын
What is the type of cache used here,is it read through cache?
@ankushmane2336
@ankushmane2336 Жыл бұрын
Hi @Java Techie, I watch this video and used the same on my system but the @Cacheable and @CacheEvict functionality does not work for me. get records not cached into the cache. could you please help me?
@Javatechie
@Javatechie Жыл бұрын
It shouldn't be behaved like this.let me cross check and update you
@vinodkumarreddy7696
@vinodkumarreddy7696 3 жыл бұрын
Thanks for the video.. Can we see cache data? and we can store it in a memory I mean local disk?
@abhireddy8164
@abhireddy8164 4 жыл бұрын
Sir please do one video on how to establish a communication betweem two microservices by using message queues with one example..i.e.one microservice pass some data to another microservice to process it..like order microservice sends data to payments microservice..
@Javatechie
@Javatechie 4 жыл бұрын
Already covered this so You could check my spring cloud stream or Kafka producer & Consumer video .
@r.kgupta2561
@r.kgupta2561 Жыл бұрын
Hi Sir , I watched this video its great explanation, but i was looking for Something like Read Through ,Write Through and Asynchronous Caching, if there is some video or blogs can you please suggest me
@trilochanpanda8165
@trilochanpanda8165 4 жыл бұрын
Could you plz explain this cache mechanism with jwt token, aslo with spring security, login and logout.
@MrRnl2004
@MrRnl2004 2 жыл бұрын
Thanks for this helpful tutorial. Can you have a tutorial how to setup your local redis? Thanks
@PriteshBhate
@PriteshBhate 3 жыл бұрын
very helpful. Sir, what parameters we passed in @Cacheable . key is understood but doesn't understand value parameter. Can you please explain .
@Javatechie
@Javatechie 3 жыл бұрын
You can pass conditional parameter in value
@shubhamkale5003
@shubhamkale5003 2 жыл бұрын
Very good video Sir
@RootAccess
@RootAccess 2 жыл бұрын
What will happen if I have multiple instances of application running?
@Javatechie
@Javatechie 2 жыл бұрын
Your request will always landed to a single instance
@RootAccess
@RootAccess 2 жыл бұрын
@@Javatechie consider I have two instances running both instances cached value for key 1 then instance 1 receive delete request after that instance 2 receive get request what will i get then will instance 2 check database?
@rexsam3134
@rexsam3134 Жыл бұрын
Initial 3 minutes were there in other video and need not be repeated here. @Cachable is added only in fetch records.
@aneckumar5701
@aneckumar5701 3 жыл бұрын
hello sir, how can i clear redis cache on booting the project , if not how can I clear cache manually?
@Javatechie
@Javatechie 3 жыл бұрын
Please check reference cache evict
@pt_trainer9244
@pt_trainer9244 2 жыл бұрын
flushall
@akaghachinaka5852
@akaghachinaka5852 3 жыл бұрын
excellent! thanks.
@sandesh4063
@sandesh4063 3 жыл бұрын
Nice video, one more thing I would like to know that how can we set expiry date to to cache, and how can we clear all keys from cache without deleting records from database? Thanks in advanced 🙏
2 жыл бұрын
Excellent.. but how compiler knows that you are using redis by annotation only??
@pt_trainer9244
@pt_trainer9244 2 жыл бұрын
O think you must add dependency
@sudhirkk007
@sudhirkk007 2 жыл бұрын
You explained every thing very well, But I can' see you redis connection details ?
@Javatechie
@Javatechie 2 жыл бұрын
Buddy connection info mentioned in config class please check
@udaysurse5438
@udaysurse5438 4 жыл бұрын
Nice
@k.i.m.5506
@k.i.m.5506 2 жыл бұрын
Hi friend, thanks for another great tutorial. One quick question -- how do you set up TTL with this solution?
@jdbcspring6804
@jdbcspring6804 4 жыл бұрын
hello, i have a question, when we cache every operation or any operation that we want what if there's changes happened in the database "update statment" in this case the data will fetch from the redis and they will took the oldest one "before the update ", can you please clarify about this ?
@TheLeony2
@TheLeony2 3 жыл бұрын
yes, but you can use @CachePut to synchronize date with cache
@WajidAli-wk8je
@WajidAli-wk8je 3 жыл бұрын
@@TheLeony2 Can you please give an example, I am trying but it does not update the list in the cache. I mean It is not updating the cache entry, after I call getall(I have cached previously) has same value as before.
@Entertainment_Zone2522
@Entertainment_Zone2522 2 жыл бұрын
How can MySQL update data in real time in redis cache?
@techappleteja8564
@techappleteja8564 4 жыл бұрын
it would be nice if show demonstrate "Product" hash with Relationships
@gursimransinghbhatiaa6131
@gursimransinghbhatiaa6131 3 жыл бұрын
Can @cachaeble be used even in non-spring classes?
@yashrao7236
@yashrao7236 3 жыл бұрын
Sir, is it possible to configure different Time To Live values for different cache values(endpoints)?
@Rohityadav-tj2bz
@Rohityadav-tj2bz Жыл бұрын
yes
@abhishekpatidar9903
@abhishekpatidar9903 4 жыл бұрын
Can i use database as mysql and redis for caching, if yes then how?
@Javatechie
@Javatechie 4 жыл бұрын
Yes we can
@srinivasang1062
@srinivasang1062 3 жыл бұрын
kzbin.info/www/bejne/mYfHgnyNpdqNoZo
@mallikarjun-shurpali9698
@mallikarjun-shurpali9698 Жыл бұрын
Thanks sir...
@saurabhmarpadge7498
@saurabhmarpadge7498 4 жыл бұрын
Nice video sir. Sir can you make a video on how to apply sharding in InMemory DB if it is possible .
@Javatechie
@Javatechie 4 жыл бұрын
Okay I will check this
@sadigepawan4710
@sadigepawan4710 4 жыл бұрын
Hi basant could you please do video on file operations and kafka streams ??
@Javatechie
@Javatechie 4 жыл бұрын
Could you please check out my spring cloud playlist
@TheTulunka
@TheTulunka 2 жыл бұрын
i love you, java techie
@arunprasadvs3452
@arunprasadvs3452 Жыл бұрын
1.How is it implemented in application 2.What functionalities in application utilizes caching 3.How do you identify that a method uses caching from code kindly reply me
@Saravanan-lj9so
@Saravanan-lj9so 4 жыл бұрын
This code is not working for me ..Getting a connection refused. Any one tried?
@Javatechie
@Javatechie 4 жыл бұрын
You need to start your redis server , I already started but missed to mention while recording video .
@Saravanan-lj9so
@Saravanan-lj9so 4 жыл бұрын
@@Javatechie Thanks.I will try
@phoneix24886
@phoneix24886 3 жыл бұрын
I don't understand something. If Redis is itself a cache, and we are saving to redis, why use @Cacheable?
@phoneix24886
@phoneix24886 3 жыл бұрын
Nevermin, use this link to get clarified - kzbin.info/www/bejne/Z5qvqmujaJh5jJo
@yashpatel-qg3ic
@yashpatel-qg3ic 2 жыл бұрын
hello @java techie , can you tell me how to do update method. I want to implement in my college project. so can you help me on this. Thankyou in advanced. If you help me in that it will be the great.
@yashpatel-qg3ic
@yashpatel-qg3ic 2 жыл бұрын
i have searched like template.opsForHash(). (for update) I didnt find anything on that, If you help me, It will be the great. atleast which method should i use for update please.
@yashpatel-qg3ic
@yashpatel-qg3ic 2 жыл бұрын
can you confirm it, it will be the same as create please.
@rajeshg3570
@rajeshg3570 3 жыл бұрын
Nice video but I don't see any reference to Redid here .. Did I miss anything ??
@gajendrathakur4833
@gajendrathakur4833 3 жыл бұрын
Thanks Sir
@himanshanawarathna5931
@himanshanawarathna5931 Жыл бұрын
Thank you !
@arunpatel1619
@arunpatel1619 2 жыл бұрын
Create video on handling shared cache in spring boot microservices
@johnvick8861
@johnvick8861 Жыл бұрын
Is there any course you provide
@HoangDuyong-zl4jk
@HoangDuyong-zl4jk 9 ай бұрын
could you please teach me how to insert data to database and redis
@simashpokharel6044
@simashpokharel6044 2 жыл бұрын
Can you make a video on Spring boot + memcached ?
@othetai6297
@othetai6297 4 жыл бұрын
video good :))
@sovansingh7937
@sovansingh7937 4 жыл бұрын
sir make a video on spring-security saml
@Javatechie
@Javatechie 4 жыл бұрын
Okay I will
@curiouspragyan1938
@curiouspragyan1938 3 жыл бұрын
How to implement redix connection pool logic
@Dedeepya9
@Dedeepya9 4 жыл бұрын
Thanks 👍
@vijayjumbad6074
@vijayjumbad6074 4 ай бұрын
But where you config redis cache?
@2RAJ21
@2RAJ21 4 ай бұрын
Thank you
@sudhirgaurav8587
@sudhirgaurav8587 Ай бұрын
looks video is incomplete
@hamzabouzidi2944
@hamzabouzidi2944 2 жыл бұрын
we say the value not the balue :)
@Harish.D-f1l
@Harish.D-f1l Жыл бұрын
I am Getting Exception, org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection;
@arjunponti1483
@arjunponti1483 4 жыл бұрын
Hi
@hamzabouzidi2944
@hamzabouzidi2944 2 жыл бұрын
bro please learn to speak english we say cache not kece
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
How to Use Redis in Your Spring Boot Project: Step-by-Step Tutorial
42:19
Engineering Digest
Рет қаралды 26 М.
How to use SpringBoot Caching using Redis and InMemory?
29:58
What is Redis Cache?
6:19
Redis
Рет қаралды 83 М.
Boost Your Spring Boot Application Performance with Redis Cache
25:39
Java Tech Solutions
Рет қаралды 8 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН