Comments (5)
Hi.
It's a good idea.
Have you an idea how to implement this ?
from twitter.
Something like this:
$timeline = Twitter::getUserTimeline(array('screen_name' => 'jas_pur', 'count' => 3));
if (Cache::has('twitter'))
return Cache::get('twitter');
else
Cache::add('twitter', $timeline, 180);
from twitter.
But if there are some tweets posted the cache won't return these...
from twitter.
See the documentation part of Cache in laravel. You can flush them, or keep the cache alive for some minutes.
Gr., Jasper
—
Sent from Mailbox for iPhone
On Mon, Jul 22, 2013 at 6:10 PM, Jonathan Thuau [email protected]
wrote:
But if there are some tweets posted the cache won't return these...
Reply to this email directly or view it on GitHub:
#2 (comment)
from twitter.
I will think of this for a next release.
For the moment you can do it in your controller.
Maybe more like this :
if (!Cache::has('twitter')){
$timeline = Twitter::getUserTimeline(array('screen_name' => 'jas_pur', 'count' => 3));
Cache::add('twitter', $timeline, 180);
}
return Cache::get('twitter');
from twitter.
Related Issues (20)
- Laravel 9 support
- psr/container 2.0 dependency not compatible HOT 7
- Tweet with polls parameter HOT 2
- Laravel 5.7 Please Provide installation steps
- [324] Tweet must not have more than 4 mediaIds HOT 1
- Getting an error when installing in laravel 9.2 HOT 1
- Why empty array is required for: Twitter::getTweet(12345678911, []) ? HOT 1
- Cant post thread
- twitter postTwitter method doesn't work in laravel 9 HOT 1
- Media not uploaded
- getTweet() params not work for ApiV1
- Not installable with Laravel 9.38.0 HOT 3
- How to get tweets with more than 1000 likes?
- will be used.
- Instructions for login via v2? HOT 7
- Unable to install the package with Laravel 9.x HOT 1
- Issue with composer require atymic/twitter "3.1.16"
- How can i use this API end point `POST /2/tweets`
- v2 api getListSubscriptions?
- Error: When authenticating requests to the Twitter API v2 endpoints, you must use keys and to (truncated...) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitter.