Laravel 5.4 api中间件缓存问题

I am using laravel 5.4 with api middleware.

api.php

Route::get('/testing',function(){
echo "foo";
});

once I hit my url say localhost/api/testing it prints "foo" but when I change the message to "bar" and again hit same url it prints "foo". Seems like my change didn't had any effect and may be some caching is being done. I tried using

php artisan cache:clear 

but then too no effect.But same code when I write in web middleware it works totally fine and change is being updated .Now I am confused should I use api middleware or change my code to web middleware Any help would be appreciated.

Just clear all cache from following artisan command:-

php artisan optimize

php artisan route:clear

php artisan config:clear

php artisan cache:clear

php artisan view:clear

Use Return 'foo' instead of echo 'foo'