github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/caches/mongodb.md (about) 1 --- 2 title: mongodb 3 type: cache 4 status: experimental 5 --- 6 7 <!-- 8 THIS FILE IS AUTOGENERATED! 9 10 To make changes please edit the contents of: 11 lib/cache/mongodb.go 12 --> 13 14 import Tabs from '@theme/Tabs'; 15 import TabItem from '@theme/TabItem'; 16 17 :::caution EXPERIMENTAL 18 This component is experimental and therefore subject to change or removal outside of major version releases. 19 ::: 20 Use a MongoDB instance as a cache. 21 22 Introduced in version 3.43.0. 23 24 ```yaml 25 # Config fields, showing default values 26 label: "" 27 mongodb: 28 url: "" 29 database: "" 30 username: "" 31 password: "" 32 collection: "" 33 key_field: "" 34 value_field: "" 35 ``` 36 37 ## Fields 38 39 ### `url` 40 41 The URL of the target MongoDB DB. 42 43 44 Type: `string` 45 Default: `""` 46 47 ```yaml 48 # Examples 49 50 url: mongodb://localhost:27017 51 ``` 52 53 ### `database` 54 55 The name of the target MongoDB DB. 56 57 58 Type: `string` 59 Default: `""` 60 61 ### `username` 62 63 The username to connect to the database. 64 65 66 Type: `string` 67 Default: `""` 68 69 ### `password` 70 71 The password to connect to the database. 72 73 74 Type: `string` 75 Default: `""` 76 77 ### `collection` 78 79 The name of the target collection in the MongoDB DB. 80 This field supports [interpolation functions](/docs/configuration/interpolation#bloblang-queries). 81 82 83 Type: `string` 84 Default: `""` 85 86 ### `key_field` 87 88 The field in the document that is used as the key. 89 90 91 Type: `string` 92 Default: `""` 93 94 ### `value_field` 95 96 The field in the document that is used as the value. 97 98 99 Type: `string` 100 Default: `""` 101 102