File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
examples/10-cached-discovery-stdio Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 1212 * file that was distributed with this source code.
1313 */
1414
15- require_once __DIR__ . '/../bootstrap.php ' ;
15+ require_once __DIR__ . '/../bootstrap.php ' ;
1616
1717use Mcp \Server ;
1818use Mcp \Server \Transport \StdioTransport ;
1919use Symfony \Component \Cache \Adapter \ArrayAdapter ;
2020use Symfony \Component \Cache \Psr16Cache ;
2121
22- // Example showing how to use discovery caching for improved performance
23- // This is especially useful in development environments where the server
24- // is restarted frequently, or in production where discovery happens on every request.
25-
2622Server::make ()
2723 ->withServerInfo ('Cached Discovery Calculator ' , '1.0.0 ' , 'Calculator with cached discovery for better performance. ' )
2824 ->withDiscovery (__DIR__ , ['. ' ])
2925 ->withLogger (logger ())
30- ->withCache (new Psr16Cache (new ArrayAdapter ())) // Enable discovery caching
26+ ->withCache (new Psr16Cache (new ArrayAdapter ()))
3127 ->build ()
3228 ->connect (new StdioTransport ());
You can’t perform that action at this time.
0 commit comments